mbox series

[net-next,0/4] mlxsw: Offload TC action pedit munge tcp/udp sport/dport

Message ID 20200621083436.476806-1-idosch@idosch.org
Headers show
Series mlxsw: Offload TC action pedit munge tcp/udp sport/dport | expand

Message

Ido Schimmel June 21, 2020, 8:34 a.m. UTC
From: Ido Schimmel <idosch@mellanox.com>

Petr says:

On Spectrum-2 and Spectrum-3, it is possible to overwrite L4 port number of
a TCP or UDP packet in the ACL engine. That corresponds to the pedit munges
of tcp and udp sport resp. dport fields. Offload these munges on the
systems where they are supported.

The current offloading code assumes that all systems support the same set
of fields. This now changes, so in patch #1 first split handling of pedit
munges by chip type. The analysis of which packet field a given munge
describes is kept generic.

Patch #2 introduces the new flexible action fields. Patch #3 then adds the
new pedit fields, and dispatches on them on Spectrum>1.

Patch #4 adds a forwarding selftest for pedit dsfield, applicable to SW as
well as HW datapaths.

Petr Machata (4):
  mlxsw: spectrum: Split handling of pedit mangle by chip type
  mlxsw: core_acl_flex_actions: Add L4_PORT_ACTION
  mlxsw: spectrum_acl: Support FLOW_ACTION_MANGLE for TCP, UDP ports
  selftests: forwarding: Add a test for pedit munge tcp, udp sport,
    dport

 .../mellanox/mlxsw/core_acl_flex_actions.c    |  51 +++++
 .../mellanox/mlxsw/core_acl_flex_actions.h    |   2 +
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |   3 +
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |  13 ++
 .../ethernet/mellanox/mlxsw/spectrum_acl.c    |  75 ++++++-
 .../selftests/net/forwarding/pedit_l4port.sh  | 198 ++++++++++++++++++
 6 files changed, 335 insertions(+), 7 deletions(-)
 create mode 100755 tools/testing/selftests/net/forwarding/pedit_l4port.sh