DPDK - mlx5 drop action 性能 patch

DPDK - mlx5 drop action 性能 patch

算吐槽一下吧!
Mellanox CX5 一条简单的 drop flow 在就能导致网卡硬件丢包造成数据包处理瓶颈!
跟了这个问题 2 年多, 这次终于解决了!

flow create 0 ingress pattern eth / ipv4 / udp / end actions drop / end

可惜的是, 这个只是解决了一个问题 ! hw flow 性能问题依然没有解决, 不知道是本身CX5硬件的瓶颈还是 firmware问题, 在添加多条no match flow后, CPU RX 小包性能直接从 148.8Mpps 掉到了 55Mpps!

以下是测试过程, 希望能早日解决:
在这里插入图片描述
在这里插入图片描述

testpmd> flow create 0 ingress pattern eth / ipv4 / udp dst is 53 / end actions count / rss / end
Flow rule #0 created
testpmd> flow create 0 ingress pattern eth / ipv4 / udp src is 53 / end actions count / rss / end
Flow rule #1 created
testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions count / rss  / end
Flow rule #2 created
testpmd> 

在这里插入图片描述

net/mlx5: fix the drop action for the DR/DV

here are multiple branches in rdma-core library backing:
the rte flows:
  - Verbs
  - Direct Verbs (DV)
  - Direct Rules (DR)

The Verbs API always requires the specifying the queue even
if there is the drop action in the flow, though the kernel
optimizes out the actual queue usage for the flows containing
the drop action. The PMD handles the dedicated Rx queue to
provide Verbs API compatibility.

The DV/DR API does not require explicit specifying the queue
at the flow creation, but PMD still specified the dedicated
drop queue as action. It performed the packet forwarding to
the dummy queue (that was not polled at all) causing the
steering pipeline resources usage and degrading the overall
packet processing rate. For example, with inserted flow to
drop all the ingress packets the statistics reported only
15Mpps of 64B packets were received over 100Gbps line.

Since the Direct Rule API for E-Switch was introduced the
rdma-core supports the dedicated drop action, that is recognized
both for DV and DR and can be used for the entire device in
unified fashion, regardless of steering domain. The similar drop
action was introduced for E-Switch, the usage of this one can be
extended for other steering domains, not for E-Switch's one only.

This patch:
  - renames esw_drop_action to dr_drop_action to emphasize
    the global nature of the variable (not only E-Switch domain)
  - specifies this global drop action instead of dedicated
    drop queue for the DR/DV flows

Cc: stable@dpdk.org
Fixes: 34fa7c0268e7 ("net/mlx5: add drop action to Direct Verbs E-Switch")
Fixes: 65b3cd0dc39b ("net/mlx5: create global drop action")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 24 +++++++++++++++++-------
 drivers/net/mlx5/mlx5.h          |  2 +-
 drivers/net/mlx5/mlx5_flow_dv.c  | 13 +++++++++++--
 3 files changed, 29 insertions(+), 10 deletions(-)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值