Skip to contentSkip to conversation

conntrack support in mlx5 PMD

PATCH Superseded Bing Zhao 4 participants 147 messages Apr 27, 2021 – May 18, 2021 Page 2 of 2

Subsystems (2)
lore
Share & tools
lore
author
#143 lore raw

PATCH v7 17/17 doc: update mlx5 support for conntrack

In reply to Bing Zhao

In the release notes and mlx5 NIC document, the support and limitation of connection tracking are added.

---
 doc/guides/nics/features/default.ini   |  1 +
 doc/guides/nics/features/mlx5.ini      |  1 +
 doc/guides/nics/mlx5.rst               | 14 ++++++++++++++
 doc/guides/rel_notes/release_21_05.rst |  2 ++
 4 files changed, 18 insertions(+)
doc/guides/nics/features/default.ini +1 -0
index 8046bd121e..0deb4ef547 100644
@@ -66,6 +66,7 @@ Module EEPROM dump   =
 Registers dump       =
 LED                  =
 Multiprocess aware   =
+Connection tracking  =
 FreeBSD              =
 Linux                =
 Windows              =
doc/guides/nics/features/mlx5.ini +1 -0
index ddd131da16..45dbe75d07 100644
@@ -45,6 +45,7 @@ Stats per queue      = Y
 FW version           = Y
 Module EEPROM dump   = Y
 Multiprocess aware   = Y
+Connection tracking  = Y
 Linux                = Y
 Windows              = P
 ARMv8                = Y
doc/guides/nics/mlx5.rst +14 -0
index e7aeb779fd..5aa1100a83 100644
@@ -108,6 +108,7 @@ Features
   flow group.
 - Flow metering, including meter policy API.
 - Flow integrity offload API.
+- Connection tracking.
 
 Limitations
 -----------
@@ -433,6 +434,14 @@ Limitations
       or
       flow create 0 ingress pattern integrity level is 0 value mask l4_ok value spec 0 / eth / ipv4 proto is udp / end …
 
+- Connection tracking:
+
+  - connection tracking (conntrack) couldn't co-exist with ASO meter, ASO age action in a single flow rule.
+  - Flow rules insertion rate and memory consumption.
+  - software limitation:
+     - ports: a maximal number of 256.
+     - conntrack: a maximal number of 4M.
+
 Statistics
 ----------
 
@@ -1695,6 +1704,11 @@ Supported hardware offloads
    |                       | | rdma-core 35  | | rdma-core 35  |
    |                       | | ConnectX-5    | | ConnectX-5    |
    +-----------------------+-----------------+-----------------+
+   | Connection tracking   | |               | | DPDK 21.05    |
+   |                       | |     N/A       | | OFED 5.3      |
+   |                       | |               | | rdma-core 35  |
+   |                       | |               | | ConnectX-6 Dx |
+   +-----------------------+-----------------+-----------------+
 
 .. table:: Minimal SW/HW versions for shared action offload
    :name: sact
doc/guides/rel_notes/release_21_05.rst +2 -0
index 4938c931ff..1b4b13f76c 100644
@@ -167,6 +167,8 @@ New Features
   * Added support for ASO (Advanced Steering Operation) meter.
   * Added support for ASO metering by PPS (packet per second).
   * Added support for the monitor policy of Power Management API.
+  * Added support for connection tracking action and item as well as context create,
+    destroy, update and query.
 
 * **Updated NXP DPAA driver.**
 
Signature · 1 line
2.26.2
#144 lore raw

Re: [dpdk-dev] [PATCH v7 17/17] doc: update mlx5 support for conntrack

Quoted 3 lines · Bing Zhao

In the release notes and mlx5 NIC document, the support and limitation of connection tracking are added.

A new NIC feature seems added, better to be acked beyond the mlx5 scope.

Quoted 14 lines
---
 doc/guides/nics/features/default.ini   |  1 +
 doc/guides/nics/features/mlx5.ini      |  1 +
 doc/guides/nics/mlx5.rst               | 14 ++++++++++++++
 doc/guides/rel_notes/release_21_05.rst |  2 ++
 4 files changed, 18 insertions(+)
doc/guides/nics/features/default.ini +0 -0
index 8046bd121e..0deb4ef547 100644

doc/guides/nics/features/default.ini Module EEPROM dump = · line 72

Quoted 7 lines
doc/guides/nics/features/default.ini +1 -0
@@ -66,6 +66,7 @@ Module EEPROM dump   =
 Registers dump       =
 LED                  =
 Multiprocess aware   =
+Connection tracking  =
 FreeBSD              =
 Linux                =
 Windows              =

Need to update 'doc/guides/nics/features.rst' too, to describe new feature.

I will drop new feature part in next-net, it can be sent as separate patch later. Will keep driver and release notes documentation.

author
#145 lore raw

Re: [dpdk-dev] [PATCH v7 17/17] doc: update mlx5 support for conntrack

Hi Ferruh & Thomas,

Quoted 49 lines

-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Thursday, May 6, 2021 2:21 AM
To: Bing Zhao <[email protected]>; Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>; NBU- Contact-Thomas Monjalon <[email protected]>
Cc: [email protected]; Ori Kam <[email protected]>; Raslan Darawsheh <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v7 17/17] doc: update mlx5 support for conntrack

External email: Use caution opening links or attachments

Quoted 1 line · Bing Zhao

In the release notes and mlx5 NIC document, the support and

limitation

Quoted 2 lines

of connection tracking are added.

A new NIC feature seems added, better to be acked beyond the mlx5 scope.

Quoted 15 lines
---
 doc/guides/nics/features/default.ini   |  1 +
 doc/guides/nics/features/mlx5.ini      |  1 +
 doc/guides/nics/mlx5.rst               | 14 ++++++++++++++
 doc/guides/rel_notes/release_21_05.rst |  2 ++
 4 files changed, 18 insertions(+)
doc/guides/nics/features/default.ini +0 -0
index 8046bd121e..0deb4ef547 100644

doc/guides/nics/features/default.ini Module EEPROM dump = · line 72

Quoted 7 lines
doc/guides/nics/features/default.ini +1 -0
@@ -66,6 +66,7 @@ Module EEPROM dump   =
 Registers dump       =
 LED                  =
 Multiprocess aware   =
+Connection tracking  =
 FreeBSD              =
 Linux                =
 Windows              =

Need to update 'doc/guides/nics/features.rst' too, to describe new feature.

Quoted 2 lines

I will drop new feature part in next-net, it can be sent as separate patch later. Will keep driver and release notes documentation.

http://patches.dpdk.org/project/dpdk/patch/[email protected]/

A new patch with the updated description is in the link below.
I checked the file of the "features.rst" again, it seems that only the API for ethdev are described.
Even if conntrack is a new feature and provided by new HW, but the only way to operate on it is to use rte_flow API now.

So I am not quite sure if it is possible and proper to list the feature in the driver feature lists table. What do you think?

BR. Bing

#146 lore raw
In reply to Bing Zhao

Hi,

Quoted 61 lines

-----Original Message-----
From: Bing Zhao <[email protected]>
Sent: Wednesday, May 5, 2021 3:23 PM
To: Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>; NBU-Contact-Thomas Monjalon <[email protected]>
Cc: [email protected]; Ori Kam <[email protected]>; Raslan Darawsheh <[email protected]>
Subject: [PATCH v7 00/17] conntrack support in mlx5 PMD

This patch set adds the connection tracking offload support in the mlx5 driver, as well as the documents update.

---
v2: code bug fixes, commits clean up and doc update
v3: fix error input pointer for CT MR registering
v4: fix typo in commit message of patch 11
v5: adjust mkey to lkey in SQ initialization
v6: rebase and solve the conflict
v7: fix compiling for the commits series
---

Bing Zhao (17):
common/mlx5: add connection tracking object definition common/mlx5: add CT offload capability checking net/mlx5: use meter color reg for CT net/mlx5: initialization of CT management common/mlx5: add Dexv CT objects creation net/mlx5: add modify support for CT
net/mlx5: add actions creating for CT net/mlx5: close CT management structure net/mlx5: add ASO CT query implementation net/mlx5: add ASO CT destroy handling net/mlx5: add translation of CT action net/mlx5: add translation of CT item net/mlx5: add CT context update
net/mlx5: validation of CT action
net/mlx5: validation of CT item
net/mlx5: add support of CT between two ports
doc: update mlx5 support for conntrack

 doc/guides/nics/features/default.ini   |   1 +
 doc/guides/nics/features/mlx5.ini      |   1 +
 doc/guides/nics/mlx5.rst               |  14 +
 doc/guides/rel_notes/release_21_05.rst |   2 +
 drivers/common/mlx5/linux/meson.build  |   2 +
 drivers/common/mlx5/mlx5_devx_cmds.c   |  53 +++
 drivers/common/mlx5/mlx5_devx_cmds.h   |   5 +
 drivers/common/mlx5/mlx5_prm.h         |  88 ++++
 drivers/common/mlx5/version.map        |   1 +
 drivers/net/mlx5/linux/mlx5_os.c       |  13 +
 drivers/net/mlx5/mlx5.c                |  92 ++++
 drivers/net/mlx5/mlx5.h                |  76 ++++
 drivers/net/mlx5/mlx5_flow.c           |  44 +-
 drivers/net/mlx5/mlx5_flow.h           | 101 ++++-
 drivers/net/mlx5/mlx5_flow_aso.c       | 592 ++++++++++++++++++++++++
 drivers/net/mlx5/mlx5_flow_dv.c        | 601 ++++++++++++++++++++++++-
 16 files changed, 1683 insertions(+), 3 deletions(-)
Quoted 2 lines

--
2.26.2

Series applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh