Skip to content

net/mlx5: add hardware steering

Suanming Mou dpdk-dev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest14 patches 3 repliesIn review
  2. v314 patches 0 repliesSuperseded
  3. v214 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v113 patches0 repliesSuperseded

v3 from the cover letter

- rebase to the latest version.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14net/mlx5: introduce hardware steering operationdrivers/net/mlx5/linux/mlx5_flow_os.h drivers/net/mlx5/meson.build drivers/net/mlx5/mlx5_flow.c +3 more+18 -00 replies
2/14net/mlx5: add HW steering low-level abstract codedrivers/net/mlx5/meson.build drivers/net/mlx5/mlx5_dr.c drivers/net/mlx5/mlx5_dr.h+840 -02 replies
3/14net/mlx5: introduce hardware steering enable routinedoc/guides/nics/mlx5.rst drivers/net/mlx5/linux/mlx5_os.c drivers/net/mlx5/mlx5.c +2 more+44 -50 replies
4/14net/mlx5: add port flow configurationdrivers/net/mlx5/mlx5.c drivers/net/mlx5/mlx5.h drivers/net/mlx5/mlx5_flow.c +2 more+292 -10 replies
5/14net/mlx5: add pattern template managementdrivers/net/mlx5/mlx5.h drivers/net/mlx5/mlx5_flow.c drivers/net/mlx5/mlx5_flow.h +1 more+188 -00 replies
6/14net/mlx5: add action template managementdrivers/net/mlx5/mlx5.h drivers/net/mlx5/mlx5_flow.c drivers/net/mlx5/mlx5_flow.h +1 more+218 -00 replies
7/14net/mlx5: add table managementdrivers/net/mlx5/mlx5.c drivers/net/mlx5/mlx5.h drivers/net/mlx5/mlx5_flow.c +2 more+753 -60 replies
8/14net/mlx5: add basic flow queue operationdoc/guides/nics/mlx5.rst doc/guides/rel_notes/release_22_03.rst drivers/net/mlx5/mlx5.h +3 more+528 -20 replies
9/14net/mlx5: add flow flush functiondrivers/net/mlx5/mlx5_flow.c drivers/net/mlx5/mlx5_flow_hw.c+137 -00 replies
10/14net/mlx5: add flow jump actiondrivers/net/mlx5/mlx5.h drivers/net/mlx5/mlx5_flow.h drivers/net/mlx5/mlx5_flow_hw.c+275 -210 replies
11/14net/mlx5: add queue and RSS actiondrivers/net/mlx5/linux/mlx5_os.c drivers/net/mlx5/mlx5.h drivers/net/mlx5/mlx5_devx.c +7 more+283 -1570 replies
12/14net/mlx5: add mark actiondrivers/net/mlx5/mlx5.h drivers/net/mlx5/mlx5_flow.h drivers/net/mlx5/mlx5_flow_hw.c+63 -60 replies
13/14net/mlx5: add indirect actiondrivers/net/mlx5/mlx5_flow.c drivers/net/mlx5/mlx5_flow.h drivers/net/mlx5/mlx5_flow_dv.c +1 more+612 -130 replies
14/14net/mlx5: add header reformat actiondrivers/net/mlx5/mlx5.h drivers/net/mlx5/mlx5_flow.h drivers/net/mlx5/mlx5_flow_dv.c +1 more+251 -30 replies

Reviews trailers per patch

All 14 patches have a Reviewed-by or Acked-by.

PatchViacheslav Ovsiienko
1/14A-b
2/14A-b
3/14A-b
4/14A-b
5/14A-b
6/14A-b
7/14A-b
8/14A-b
9/14A-b
10/14A-b
11/14A-b
12/14A-b
13/14A-b
14/14A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 00/14] net/mlx5: add hardware steering

The Connect-X steering is a lookup hardware mechanism that accesses flow tables, matches packets to the rules, and performs specified actions. Historically, mlx5 PMD implements several software engines to manage steering hardware facility:

- FW Steering - Verbs/Direct Verbs, uses FW calls to manage flows
- SW Steering - DevX/mlx5dv, uses WQEs to access table memory directly

However, there are still some disadvantages:

- performance is limited, we should invoke firmware either to manage the entire flow, or to handle some internal steering objects

- organizing and preparing flow infrastructure (actions, matchers, groups, etc.) on the flow inserting is sure to cause slow flow insertion

- security, exposing the low-level steering entries directly to the userspace may cause security risks

A new hardware WQE based steering operation with codename "HW Steering" is going to be introduced to get rid of the security risks. And it will take advantage of the recently new introduced async queue-based rte_flow APIs to prepare everything in advance to achieve high insertion rate.

In this new HW steering engine, the original SW steering rte_flow API will not be supported in the first implementation, only the new async queue-based flow operations is going to be supported. A new steering mode parameter for dv_flow_en will be introduced and user will be able to engage the new steering engine.

---

v4:
v3:
- rebase to the latest version.

v2:
- New HW steering low-level abstract code added.
- commit message improvement.
- add protection for rte_flow and rte_flow_async callbacks.
- rebase to rte_flow_async v9.
- fix some rte_flow error not filled bugs.

Suanming Mou (14):
net/mlx5: introduce hardware steering operation net/mlx5: add HW steering low-level abstract code net/mlx5: introduce hardware steering enable routine net/mlx5: add port flow configuration net/mlx5: add pattern template management net/mlx5: add action template management net/mlx5: add table management
net/mlx5: add basic flow queue operation net/mlx5: add flow flush function
net/mlx5: add flow jump action
net/mlx5: add queue and RSS action net/mlx5: add mark action
net/mlx5: add indirect action
net/mlx5: add header reformat action

 doc/guides/nics/mlx5.rst                |   19 +-
 doc/guides/rel_notes/release_22_03.rst  |    1 +
 drivers/net/mlx5/linux/mlx5_flow_os.h   |    1 +
 drivers/net/mlx5/linux/mlx5_os.c        |   22 +-
 drivers/net/mlx5/meson.build            |    2 +
 drivers/net/mlx5/mlx5.c                 |   55 +-
 drivers/net/mlx5/mlx5.h                 |   66 +-
 drivers/net/mlx5/mlx5_devx.c            |   10 +
 drivers/net/mlx5/mlx5_dr.c              |  383 ++++
 drivers/net/mlx5/mlx5_dr.h              |  456 +++++
 drivers/net/mlx5/mlx5_flow.c            |  721 ++++++-
 drivers/net/mlx5/mlx5_flow.h            |  287 +++
 drivers/net/mlx5/mlx5_flow_dv.c         |  186 +-
 drivers/net/mlx5/mlx5_flow_hw.c         | 2337 +++++++++++++++++++++++
 drivers/net/mlx5/mlx5_flow_verbs.c      |    7 +-
 drivers/net/mlx5/mlx5_rx.h              |    9 +-
 drivers/net/mlx5/mlx5_rxq.c             |   85 +-
 drivers/net/mlx5/windows/mlx5_flow_os.h |    1 +
 18 files changed, 4468 insertions(+), 180 deletions(-)
 create mode 100644 drivers/net/mlx5/mlx5_dr.c
 create mode 100644 drivers/net/mlx5/mlx5_dr.h
 create mode 100644 drivers/net/mlx5/mlx5_flow_hw.c
Signature · 1 line
2.25.1