From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C9C0641DE6; Mon, 6 Mar 2023 13:41:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5FAB40E50; Mon, 6 Mar 2023 13:41:04 +0100 (CET) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id 26E2040A8A for ; Mon, 6 Mar 2023 13:41:04 +0100 (CET) Received: by inbox.dpdk.org (Postfix, from userid 33) id 18B6A41DF5; Mon, 6 Mar 2023 13:41:04 +0100 (CET) From: bugzilla@dpdk.org To: dev@dpdk.org Subject: [Bug 1173] RTE flow: non-ip packets are not delivered when RSS hash type ESP is used Date: Mon, 06 Mar 2023 12:41:03 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: ethdev X-Bugzilla-Version: 22.11 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kuka@cesnet.cz X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: multipart/alternative; boundary=16781064630.9F3fF1b1b.2524361 Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --16781064630.9F3fF1b1b.2524361 Date: Mon, 6 Mar 2023 13:41:03 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All https://bugs.dpdk.org/show_bug.cgi?id=3D1173 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 ru= le with empty pattern and rss action with specific combination of RSS hash typ= es: "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-t= cp ipv4-udp ipv4-other ipv6-tcp ipv6-udp ipv6-other esp end / end testpmd> start=20 # generate packets by scapy=20 >>> sendp(Ether(dst=3D"01:00:00:00:00:00")/IP(), iface=3D"ens4f1np1", count= =3D10) >>> sendp(Ether(dst=3D"01:00:00:00:00:00")/ARP(), iface=3D"ens4f1np1", coun= t=3D10) >>> sendp(Ether(dst=3D"01:00:00:00:00:00")/LACP(), iface=3D"ens4f1np1", cou= nt=3D10) 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]=20 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 probl= em 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-t= cp 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-u= dp 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=3Dens4f0np0 drv=3Dmlx5= _core unused=3D=20 0000:af:00.1 'MT2892 Family [ConnectX-6 Dx] 101d' if=3Dens4f1np1 drv=3Dmlx5= _core unused=3D=20 [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(-) --=20 You are receiving this mail because: You are the assignee for the bug.= --16781064630.9F3fF1b1b.2524361 Date: Mon, 6 Mar 2023 13:41:03 +0100 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All
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 ru=
le
with empty pattern and rss action with specific combination of RSS hash typ=
es:
"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 ipv=
4-tcp
ipv4-udp ipv4-other ipv6-tcp ipv6-udp ipv6-other esp end / end
testpmd> start=20

# generate packets by scapy=20
>>> sendp(Ether(dst=3D"01:00:00:00:00:0=
0")/IP(), iface=3D"ens4f1np1", count=3D10)
>>> sendp(Ether(dst=3D"01:00:00:00:00:00")/ARP(), iface=
=3D"ens4f1np1", count=3D10)
>>> sendp(Ether(dst=3D"01:00:00:00:00:00")/LACP(), iface=
=3D"ens4f1np1", count=3D10)

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]=20
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 probl=
em
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 ty=
pes
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 ipv=
4-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 ipv=
4-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 <thom=
as@monjalon.net>
Date:   Sun Nov 27 11:36:36 2022 +0100

    version: 22.11.0

    Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

[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=3Dens4f0np0 drv=3Dmlx5=
_core
unused=3D=20
0000:af:00.1 'MT2892 Family [ConnectX-6 Dx] 101d' if=3Dens4f1np1 drv=3Dmlx5=
_core
unused=3D=20

[OFED]
MLNX_OFED_LINUX-5.7-1.0.2.0

[Bad commit]
commit 18ca4a4ec73a2e28df45a10543b7cdd45f2801dd (HEAD)
Author: Raja Zidane <rzidane&#=
64;nvidia.com>
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 <rzidane@nvidia.com>
    Acked-by: Matan Azrad <matan=
@nvidia.com>

 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.
=20=20=20=20=20=20=20=20=20=20
= --16781064630.9F3fF1b1b.2524361--