mbox series

[net-next,0/6] mlxsw: Offload TC action pedit munge dsfield

Message ID 20200326140114.1393972-1-idosch@idosch.org
Headers show
Series mlxsw: Offload TC action pedit munge dsfield | expand

Message

Ido Schimmel March 26, 2020, 2:01 p.m. UTC
From: Ido Schimmel <idosch@mellanox.com>

Petr says:

The Spectrum switches allow packet prioritization based on DSCP on ingress,
and update of DSCP on egress. This is configured through the DCB APP rules.
For some use cases, assigning a custom DSCP value based on an ACL match is
a better tool. To that end, offload FLOW_ACTION_MANGLE to permit changing
of dsfield as a whole, or DSCP and ECN values in isolation.

After fixing a commentary nit in patch #1, and mlxsw naming in patch #2,
patches #3 and #4 add the offload to mlxsw.

Patch #5 adds a forwarding selftest for pedit dsfield, applicable to SW as
well as HW datapaths. Patch #6 adds a mlxsw-specific test to verify DSCP
rewrite due to DCB APP rules is not performed on pedited packets.

The tests only cover IPv4 dsfield setting. We have tests for IPv6 as well,
but would like to postpone their contribution until the corresponding
iproute patches have been accepted.

Petr Machata (6):
  net: flow_offload.h: Fix a comment at flow_action_entry.mangle
  mlxsw: core: Rename mlxsw_afa_qos_cmd to mlxsw_afa_qos_switch_prio_cmd
  mlxsw: core: Add DSCP, ECN, dscp_rw to QOS_ACTION
  mlxsw: spectrum_flower: Offload FLOW_ACTION_MANGLE
  selftests: forwarding: Add a forwarding test for pedit munge dsfield
  selftests: mlxsw: qos_dscp_router: Test no DSCP rewrite after pedit

 .../mellanox/mlxsw/core_acl_flex_actions.c    | 134 +++++++++-
 .../mellanox/mlxsw/core_acl_flex_actions.h    |   7 +
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |   5 +
 .../ethernet/mellanox/mlxsw/spectrum_acl.c    |  91 +++++++
 .../ethernet/mellanox/mlxsw/spectrum_flower.c |  15 ++
 include/net/flow_offload.h                    |   3 +-
 .../drivers/net/mlxsw/qos_dscp_router.sh      |  30 +++
 .../selftests/net/forwarding/pedit_dsfield.sh | 238 ++++++++++++++++++
 8 files changed, 515 insertions(+), 8 deletions(-)
 create mode 100755 tools/testing/selftests/net/forwarding/pedit_dsfield.sh