如何使用 RTE_FLOW? 在 DPDK 中通过循环方式进行负载平衡
在我的问题中,RSS 在 CPU 核心之间没有良好的负载平衡,情况下 rx 数据包已通过在 mac 和 ip 之间插入标签进行修改,因此 dpdk 无法识别它。假设我想通过循环、多个的方式进行负载平衡rx 队列已设置。在这个问题中回答:如何禁用 RSS 但仍在 DPDK 中使用多个 RX 队列?它说可以通过使用 RTE_FLOW 以循环方式进行负载平衡。从语法上讲,正确的做法是什么? 我想知道用于设置循环方法的 API 或结构 这是我的运行时环境信息: 1)dpdk版本:19.11.9 2)NIC PMD:ixgbe 3)防火墙:825999和XXV710 4)操作系统版本:ubuntu 16.04 内核:4.4.0-186
in my problem RSS did not have a good load balance between CPU cores case the rx packets has been modified by insert tags between mac and ip so the dpdk could not recognize it.assume I want to load balance by way of round-robin, Multiple rx queues have been set up. in this question answer: How to disable RSS but still using multiple RX queues in DPDK? it says its possible to load balance in round robin fashion by using RTE_FLOW. what is the right way to do it grammatically ?
I would like to know the API or structs for setting up the round-robin method
here is my runtime environment infomation:
1)dpdk version: 19.11.9
2)nic PMD :ixgbe
3) fireware:825999 and XXV710
4) os version: ubuntu 16.04 kernel:4.4.0-186
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据问题
有几项需要澄清。因此,让我解释一下
RAW 模式
。此功能的目的是支持默认情况下 NIC 无法理解的特殊协议(VXLAN、GENEVE、RTP 和其他协议)。因此,根据 NIC、供应商、L2 的 RSS 支持和固件,在端口 init 或 RTE_FLOW 特定配置中计算 RSS 的能力会有所不同。例如,
NH_FLD_ETH_TYPE 和 NET_PROT_ETH
RSS_DMAC_INDEX
FLOW_KEY_TYPE_VLAN 和 FLOW_KEY_TYPE_CH_LEN_90B
因此对于 NIC
ixgbe 和 XXV710
代码> 没有准备好支持以太网和 IP 之间的自定义标头
。替代方案:
RAW
标头。 6.2。一旦供应商添加了支持,您就可以创建一个简单的流量传播工具
,它将确保流量以循环方式分布在所需的 RX 队列中。它会产生两重问题
对于选项 4(软件模型):
rte_distributor
库根据自定义分配流量。rte_eventdev
和原子模型来将工作负载分散到多个worker上。[评论澄清]:
[答案] 由于您使用的是自定义标头而不是通用 VLAN|IP|端口,因此此建议不正确。正如您在问题和评论中澄清的那样,您希望像 RSS 一样分发自定义标头。
[ANSWER],如上所述,并非所有网卡都支持 RSS 和 RAW。由于您当前的网卡是 ixgbe 和 i40e,解析和执行自定义标头的 RSS 的功能不太可能。您可以尝试选项 2(与 intel 创建新的 ddp 一起使用)为 i40e 实现相同的效果或按照选项 4 中的建议在软件中实现。
[ANSWER],通常是使用代码片段或用于重现错误的步骤进行更新。但目前的问题更像是澄清。请参考上文。
As per the question
There are couple of items which needs to be clarified. so let me explain
RAW Pattern
. The intend of this feature is support Special protocol which by default the NIC does not understand like (VXLAN, GENEVE, RTP and other protocols).Hence depending upon NIC, vendor, RSS support for L2 and firmware the ability calculating RSS on fields between varies in port init or RTE_FLOW specific configuration. For example RSS ETH supported on
I40E_INSET_DMAC | I40E_INSET_SMAC
NH_FLD_ETH_TYPE and NET_PROT_ETH
RSS_DMAC_INDEX
FLOW_KEY_TYPE_VLAN and FLOW_KEY_TYPE_CH_LEN_90B
Hence for NIC
ixgbe and XXV710
there is no ready support for thecustom header
between ethernet and IP.Alternatives:
RAW
header as defined 12.2.6.2. Once the support is added by the vendor you can create a simpletraffic spread tool
which will ensure traffic distribution across the desired RX queues in round robin fashion.note: I am not recommending use of HW based static Round Robin as it will create 2 fold problem
For option 4 (Software Model):
rte_distributor
library to spread traffic based on the custom.rte_eventdev
with atomic model to spread the work load on multiple worker.[Clarification from Comments]:
[ANSWER] Since you are using custom header and not generic VLAN|IP|Port this suggestion is not correct. As you have clarified in question and comments you want to distribute like RSS for custom header.
[ANSWER] as explained above not all nic support RSS and RAW. Since your current NIC is
ixgbe and i40e
the function of parsing and executing RSS for custom header is unlikely. you can try option 2 (work with intel create new ddp) for i40e to achieve the same or implement in SW as suggested in option 4.[ANSWER] normally one updates with code snippets or steps used for reproducing the error. But the current question is more like clarification. Please refer above.