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

Comments

Jakub Kicinski June 22, 2020, 10:31 p.m. UTC | #1
On Sun, 21 Jun 2020 11:34:32 +0300 Ido Schimmel wrote:
> 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.

Reviewed-by: Jakub Kicinski <kuba@kernel.org>
David Miller June 22, 2020, 11:32 p.m. UTC | #2
From: Ido Schimmel <idosch@idosch.org>
Date: Sun, 21 Jun 2020 11:34:32 +0300

> 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.

Series applied to net-next, thank you.