mbox series

[net-next,V2,00/15] mlx5 HW-Managed Flow Steering in FS core level

Message ID 20250109160546.1733647-1-tariqt@nvidia.com (mailing list archive)
Headers show
Series mlx5 HW-Managed Flow Steering in FS core level | expand

Message

Tariq Toukan Jan. 9, 2025, 4:05 p.m. UTC
Hi,

This patchset by Moshe follows Yevgeny's patchsets [1][2] on subject
"HW-Managed Flow Steering in mlx5 driver". As introduced there in HW
managed Flow Steering mode (HWS) the driver is configuring steering
rules directly to the HW using WQs with a special new type of WQE (Work
Queue Element). This way we can reach higher rule insertion/deletion
rate with much lower CPU utilization compared to SW Managed Flow
Steering (SWS).

This patchset adds API to manage namespace, flow tables, flow groups and
prepare FTE (Flow Table Entry) rules. It also adds caching and pool
mechanisms for HWS actions to allow sharing of steering actions among
different rules. The implementation of this API in FS layer, allows FS
core to use HW Managed Flow Steering in addition to the existing FW or
SW Managed Flow Steering.

Patch 13 of this series adds support for configuring HW Managed Flow
Steering mode through devlink param, similar to configuring SW Managed
Flow Steering mode:

 # devlink dev param set pci/0000:08:00.0 name flow_steering_mode \
      cmode runtime value hmfs

In addition, the series contains 2 HWS patches from Yevgeny that
implement flow update support.

[1] https://lore.kernel.org/netdev/20240903031948.78006-1-saeed@kernel.org/
[2] https://lore.kernel.org/all/20250102181415.1477316-1-tariqt@nvidia.com/

Regards,
Tariq

V2:
- Added two HWS patches to the series
- Added documentation on mlx5.rst
- Added prefix to static functions (Przemek Kitszel)
- Fixed returned error value and copyright year (Przemek Kitszel)
- Added missing braces (Przemek Kitszel)
- Added comma on enum definition (Przemek Kitszel)

Moshe Shemesh (13):
  net/mlx5: fs, add HWS root namespace functions
  net/mlx5: fs, add HWS flow table API functions
  net/mlx5: fs, add HWS flow group API functions
  net/mlx5: fs, add HWS actions pool
  net/mlx5: fs, add HWS packet reformat API function
  net/mlx5: fs, add HWS modify header API function
  net/mlx5: fs, manage flow counters HWS action sharing by refcount
  net/mlx5: fs, add dest table cache
  net/mlx5: fs, add HWS fte API functions
  net/mlx5: fs, add support for dest vport HWS action
  net/mlx5: fs, set create match definer to not supported by HWS
  net/mlx5: fs, add HWS get capabilities
  net/mlx5: fs, add HWS to steering mode options

Yevgeny Kliteynik (2):
  net/mlx5: HWS, update flow - remove the use of dual RTCs
  net/mlx5: HWS, update flow - support through bigger action RTC

 Documentation/networking/devlink/mlx5.rst     |    3 +
 .../net/ethernet/mellanox/mlx5/core/Makefile  |    5 +-
 .../net/ethernet/mellanox/mlx5/core/fs_core.c |   50 +-
 .../net/ethernet/mellanox/mlx5/core/fs_core.h |   62 +-
 .../ethernet/mellanox/mlx5/core/fs_counters.c |   42 +-
 .../net/ethernet/mellanox/mlx5/core/fs_pool.c |    5 +-
 .../net/ethernet/mellanox/mlx5/core/fs_pool.h |    5 +-
 .../mellanox/mlx5/core/steering/hws/debug.c   |   10 +-
 .../mellanox/mlx5/core/steering/hws/fs_hws.c  | 1377 +++++++++++++++++
 .../mellanox/mlx5/core/steering/hws/fs_hws.h  |   80 +
 .../mlx5/core/steering/hws/fs_hws_pools.c     |  450 ++++++
 .../mlx5/core/steering/hws/fs_hws_pools.h     |   73 +
 .../mlx5/core/steering/hws/internal.h         |    1 -
 .../mellanox/mlx5/core/steering/hws/matcher.c |  180 +--
 .../mellanox/mlx5/core/steering/hws/matcher.h |    8 +-
 .../mellanox/mlx5/core/steering/hws/rule.c    |  141 +-
 .../mellanox/mlx5/core/steering/hws/rule.h    |   16 +-
 .../mellanox/mlx5/core/steering/hws/send.c    |   20 +-
 include/linux/mlx5/mlx5_ifc.h                 |    1 +
 19 files changed, 2245 insertions(+), 284 deletions(-)
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.h
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws_pools.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws_pools.h


base-commit: a3b3d2dc389568a77d0e25da17203e3616218e93