https://bugs.dpdk.org/show_bug.cgi?id=1173 Bug ID: 1173 Summary: RTE flow: non-ip packets are not delivered when RSS hash type ESP is used Product: DPDK Version: 22.11 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: Normal Component: ethdev Assignee: dev@dpdk.org Reporter: kuka@cesnet.cz Target Milestone: --- [Overview] Non-ip packets such as ARP or LACP are not delivered if you use RTE flow rule with empty pattern and rss action with specific combination of RSS hash types: "ipv4-tcp ipv4-udp ipv4-other ipv6-tcp ipv6-udp ipv6-other esp". [Steps to Reproduce] - testpmd sudo dpdk-testpmd -c f -n 4 -a 0000:af:00.0 -- -i testpmd> port stop 0 testpmd> flow isolate 0 1 testpmd> port start 0 testpmd> flow create 0 group 0 ingress pattern end actions rss types ipv4-tcp ipv4-udp ipv4-other ipv6-tcp ipv6-udp ipv6-other esp end / end testpmd> start # generate packets by scapy >>> sendp(Ether(dst="01:00:00:00:00:00")/IP(), iface="ens4f1np1", count=10) >>> sendp(Ether(dst="01:00:00:00:00:00")/ARP(), iface="ens4f1np1", count=10) >>> sendp(Ether(dst="01:00:00:00:00:00")/LACP(), iface="ens4f1np1", count=10) testpmd> stop ---------------------- Forward statistics for port 0 ---------------------- RX-packets: 10 RX-dropped: 0 RX-total: 10 TX-packets: 10 TX-dropped: 0 TX-total: 10 ---------------------------------------------------------------------------- [Actual Results] non-ip packets such as ARP or LACP are not delivered to the dpdk. [Expected Results] non-ip packets such as ARP or LACP packets should be delivered to dpdk If you use a different pattern such as void instead of the empty pattern or omit one of the RSS hash types mentioned in the previous example, the problem disappears and non-ip packets such as ARP and LACP are correctly delivered to the DPDK Example of flow rules for dpdk-testpmd that works correctly: # use pattern void instead empty testpmd> flow create 0 group 0 ingress pattern void / end actions rss types ipv4-tcp ipv4-udp ipv4-other ipv6-tcp ipv6-udp ipv6-other esp end / end # omit RSS hash type esp testpmd> flow create 0 group 0 ingress pattern end actions rss types ipv4-tcp ipv4-udp ipv4-other ipv6-tcp ipv6-udp ipv6-other end / end # omit RSS hash type ipv4-tcp testpmd> flow create 0 group 0 ingress pattern end actions rss types ipv4-udp ipv4-other ipv6-tcp ipv6-udp ipv6-other esp end / end [DPDK version] commit f262f16087ea6a77357a915cf4c0d10ddc7b6562 (HEAD, tag: v22.11, origin/releases) Author: Thomas Monjalon Date: Sun Nov 27 11:36:36 2022 +0100 version: 22.11.0 Signed-off-by: Thomas Monjalon [OS version] Operating System: Oracle Linux Server 8.7 Kernel: Linux 4.18.0-348.12.2.el8_5.x86_64 Architecture: x86-64 [Network devices] 0000:af:00.0 'MT2892 Family [ConnectX-6 Dx] 101d' if=ens4f0np0 drv=mlx5_core unused= 0000:af:00.1 'MT2892 Family [ConnectX-6 Dx] 101d' if=ens4f1np1 drv=mlx5_core unused= [OFED] MLNX_OFED_LINUX-5.7-1.0.2.0 [Bad commit] commit 18ca4a4ec73a2e28df45a10543b7cdd45f2801dd (HEAD) Author: Raja Zidane Date: Thu May 12 12:17:11 2022 +0300 net/mlx5: support ESP SPI match and RSS hash In packets with ESP header, the inner IP will be encrypted, and its fields cannot be used for RSS hashing. So, ESP packets can be hashed only by the outer IP layer. So, when using RSS on ESP packets, hashing may not be efficient, because the fields used by the hash functions are only the outer IPs, causing all traffic belonging to all tunnels between a given pair of GWs to land on one core. Adding the SPI hash field can extend the spreading of IPsec packets. Signed-off-by: Raja Zidane Acked-by: Matan Azrad doc/guides/nics/features/mlx5.ini | 1 + doc/guides/nics/mlx5.rst | 1 + doc/guides/rel_notes/release_22_07.rst | 1 + drivers/common/mlx5/linux/meson.build | 2 ++ drivers/common/mlx5/mlx5_prm.h | 5 +++- drivers/net/mlx5/mlx5_defs.h | 2 +- drivers/net/mlx5/mlx5_devx.c | 4 +++- drivers/net/mlx5/mlx5_flow.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- drivers/net/mlx5/mlx5_flow.h | 20 ++++++++++++++++ drivers/net/mlx5/mlx5_flow_dv.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 10 files changed, 203 insertions(+), 5 deletions(-) -- You are receiving this mail because: You are the assignee for the bug.