Skip to content

net/mlx5: Refactor esw QoS to support generalized operations

Tariq Toukan netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest15 patches 6 repliesApplied 15/15
  2. v215 patches 2 repliesSuperseded
  3. v115 patches 6 repliesSuperseded

Changes in v3 from the cover letter

- Fixed potential NULL dereference for vport sched_node.
- Updated the check in esw_qos_normalize_min_rate to stop on leafs.

Patches in v3 All 15 applied

#Subject and filesSizeRepliesApplied
1/15net/mlx5: Refactor QoS group scheduling element creationdrivers/net/ethernet/mellanox/mlx5/core/esw/qos.c+31 -331 replyApplied
2/15net/mlx5: Introduce node type to rate group structuredrivers/net/ethernet/mellanox/mlx5/core/esw/qos.c+18 -101 replyApplied
3/15net/mlx5: Add parent group support in rate group structuredrivers/net/ethernet/mellanox/mlx5/core/esw/qos.c+11 -61 replyApplied
4/15net/mlx5: Restrict domain list insertion to root TSAR ancestorsdrivers/net/ethernet/mellanox/mlx5/core/esw/qos.c+4 -11 replyApplied
5/15net/mlx5: Rename vport QoS group reference to parentdrivers/net/ethernet/mellanox/mlx5/core/esw/diag/qos_tracepoint.h drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c drivers/net/ethernet/mellanox/mlx5/core/eswitch.h+29 -271 replyApplied
6/15net/mlx5: Introduce node struct and rename group terminology to nodedrivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c drivers/net/ethernet/mellanox/mlx5/core/esw/diag/qos_tracepoint.h drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c +1 more+217 -2151 replyApplied
7/15net/mlx5: Refactor vport scheduling element creation functiondrivers/net/ethernet/mellanox/mlx5/core/esw/qos.c+15 -120 repliesApplied
8/15net/mlx5: Refactor vport QoS to use scheduling node structuredrivers/net/ethernet/mellanox/mlx5/core/esw/diag/qos_tracepoint.h drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c drivers/net/ethernet/mellanox/mlx5/core/esw/qos.h +2 more+110 -670 repliesApplied
9/15net/mlx5: Remove vport QoS enabled flagdrivers/net/ethernet/mellanox/mlx5/core/esw/qos.c drivers/net/ethernet/mellanox/mlx5/core/eswitch.h+6 -90 repliesApplied
10/15net/mlx5: Simplify QoS scheduling element configurationdrivers/net/ethernet/mellanox/mlx5/core/esw/qos.c+40 -460 repliesApplied
11/15net/mlx5: Generalize QoS operations for nodes and vportsdrivers/net/ethernet/mellanox/mlx5/core/esw/qos.c+43 -720 repliesApplied
12/15net/mlx5: Add sync reset drop mode supportdrivers/net/ethernet/mellanox/mlx5/core/fw_reset.c+8 -10 repliesApplied
13/15net/mlx5: Only create VEPA flow table when in VEPA modedrivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c+13 -140 repliesApplied
14/15net/mlx5: fs, rename packet reformat struct member actiondrivers/net/ethernet/mellanox/mlx5/core/fs_core.h drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c+14 -110 repliesApplied
15/15net/mlx5: fs, rename modify header struct member actiondrivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c drivers/net/ethernet/mellanox/mlx5/core/fs_core.h drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c+10 -80 repliesApplied

Reviews trailers per patch

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

PatchCosmin RatiuSaeed MahameedYevgeny KliteynikAya LevinDaniel Machon
1/15R-b R-b
2/15R-b R-b
3/15R-b R-b
4/15R-b R-b
5/15R-b R-b
6/15R-b R-b
7/15R-b
8/15R-b
9/15R-b
10/15R-b
11/15R-b
12/15R-b
13/15R-b R-b
14/15R-b
15/15R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v3 thread

Cover letter [PATCH net-next V3 00/15] net/mlx5: Refactor esw QoS to support generalized operations

Hi,

This patch series from the team to mlx5 core driver consists of one main QoS part followed by small misc patches.

This main part (patches 1 to 11) by Carolina refactors the QoS handling to generalize operations on scheduling groups and vports. These changes are necessary to support new features that will extend group functionality, introduce new group types, and support deeper hierarchies.

Additionally, this refactor updates the terminology from "group" to "node" to better reflect the hardware’s rate hierarchy and its use of scheduling element nodes.

Simplify group scheduling element creation:
- net/mlx5: Refactor QoS group scheduling element creation

Refactor to support generalized operations for QoS:
- net/mlx5: Introduce node type to rate group structure
- net/mlx5: Add parent group support in rate group structure
- net/mlx5: Restrict domain list insertion to root TSAR ancestors
- net/mlx5: Rename vport QoS group reference to parent
- net/mlx5: Introduce node struct and rename group terminology to node
- net/mlx5: Refactor vport scheduling element creation function
- net/mlx5: Refactor vport QoS to use scheduling node structure
- net/mlx5: Remove vport QoS enabled flag

Support generalized operations for QoS elements:
- net/mlx5: Simplify QoS scheduling element configuration
- net/mlx5: Generalize QoS operations for nodes and vports

On top, patch 12 by Moshe handles FW request to move to drop mode.

In patch 13, Benjamin Poirier removes an empty eswitch flow table when not used, which improves packet processing performance.

Patches 14 and 15 by Moshe are small field renamings as preparation for future fields addition to these structures.

Series generated against:
commit c531f2269a53 ("net: bcmasp: enable SW timestamping")

Regards,
Tariq

V3:
- Fixed potential NULL dereference for vport sched_node.
- Updated the check in esw_qos_normalize_min_rate to stop on leafs.

V2:
- Declared int err separately to fix the type mismatch with u32.
- Fixed potential NULL dereference in the node allocation error path.
- Removed "rate_node" renamings, as it referred to the old "rate_group".
- Replaced 0 with NULL in mlx5_esw_qos_vport_get_parent.
- Fixed vport node allocation error path.
- Initialized dev in mlx5_esw_qos_vport_disable.
- Access vport_node->esw directly where possible.

Benjamin Poirier (1):
net/mlx5: Only create VEPA flow table when in VEPA mode

Carolina Jubran (11):
net/mlx5: Refactor QoS group scheduling element creation net/mlx5: Introduce node type to rate group structure net/mlx5: Add parent group support in rate group structure net/mlx5: Restrict domain list insertion to root TSAR ancestors net/mlx5: Rename vport QoS group reference to parent net/mlx5: Introduce node struct and rename group terminology to node net/mlx5: Refactor vport scheduling element creation function net/mlx5: Refactor vport QoS to use scheduling node structure net/mlx5: Remove vport QoS enabled flag
net/mlx5: Simplify QoS scheduling element configuration net/mlx5: Generalize QoS operations for nodes and vports

Moshe Shemesh (3):
net/mlx5: Add sync reset drop mode support net/mlx5: fs, rename packet reformat struct member action net/mlx5: fs, rename modify header struct member action

 .../mellanox/mlx5/core/en/tc/ct_fs_smfs.c     |   4 +-
 .../mellanox/mlx5/core/esw/devlink_port.c     |   2 +-
 .../mlx5/core/esw/diag/qos_tracepoint.h       |  53 +-
 .../ethernet/mellanox/mlx5/core/esw/legacy.c  |  27 +-
 .../net/ethernet/mellanox/mlx5/core/esw/qos.c | 669 +++++++++---------
 .../net/ethernet/mellanox/mlx5/core/esw/qos.h |   3 +
 .../net/ethernet/mellanox/mlx5/core/eswitch.c |   2 +
 .../net/ethernet/mellanox/mlx5/core/eswitch.h |  25 +-
 .../net/ethernet/mellanox/mlx5/core/fs_core.h |   4 +-
 .../ethernet/mellanox/mlx5/core/fw_reset.c    |   9 +-
 .../mellanox/mlx5/core/steering/fs_dr.c       |  35 +-
 11 files changed, 435 insertions(+), 398 deletions(-)
Signature · 1 line
2.44.0