mbox series

[net-next,0/4] mlxsw: Refactor parsing configuration

Message ID 20210822113716.1440716-1-idosch@idosch.org (mailing list archive)
Headers show
Series mlxsw: Refactor parsing configuration | expand

Message

Ido Schimmel Aug. 22, 2021, 11:37 a.m. UTC
From: Ido Schimmel <idosch@nvidia.com>

The Spectrum ASIC has a configurable limit on how deep into the packet
it parses. By default, the limit is 96 bytes.

There are several cases where this parsing depth is not enough and there
is a need to increase it: Decapsulation of VxLAN packets and
timestamping of PTP packets.

Currently, parsing depth API is maintained as part of VxLAN module,
because the MPRS register which configures parsing depth also configures
UDP destination port number used for VxLAN encapsulation and
decapsulation.

However, in addition to two above mentioned users of this API, the
multipath hash code also needs to invoke it in order to correctly hash
based on inner fields of IPv6-in-IPv6 packets.

Upcoming support for IPv6-in-IPv6 tunneling will add another user, as
without increasing the parsing depth such packets cannot be properly
decapsulated.

Therefore, this patchset refactors the parsing configuration API and
moves it out of the VxLAN module to the main driver code.

Tested using existing selftests.

Patch set overview:

Patch #1 adds the new parsing configuration infrastructure.
Patch #2 converts existing users to the new infrastructure.
Patch #3 deletes the old infrastructure.
Patch #4 calls the new infrastructure from the multipath hash code.

Amit Cohen (4):
  mlxsw: spectrum: Add infrastructure for parsing configuration
  mlxsw: Convert existing consumers to use new API for parsing
    configuration
  mlxsw: Remove old parsing depth infrastructure
  mlxsw: spectrum_router: Increase parsing depth for multipath hash

 .../net/ethernet/mellanox/mlxsw/spectrum.c    | 82 ++++++++++++++++
 .../net/ethernet/mellanox/mlxsw/spectrum.h    | 12 +++
 .../ethernet/mellanox/mlxsw/spectrum_nve.h    |  1 -
 .../mellanox/mlxsw/spectrum_nve_vxlan.c       | 94 ++++---------------
 .../ethernet/mellanox/mlxsw/spectrum_ptp.c    |  4 +-
 .../ethernet/mellanox/mlxsw/spectrum_router.c | 44 ++++++++-
 .../ethernet/mellanox/mlxsw/spectrum_router.h |  1 +
 7 files changed, 160 insertions(+), 78 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Aug. 22, 2021, 8:50 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Sun, 22 Aug 2021 14:37:12 +0300 you wrote:
> From: Ido Schimmel <idosch@nvidia.com>
> 
> The Spectrum ASIC has a configurable limit on how deep into the packet
> it parses. By default, the limit is 96 bytes.
> 
> There are several cases where this parsing depth is not enough and there
> is a need to increase it: Decapsulation of VxLAN packets and
> timestamping of PTP packets.
> 
> [...]

Here is the summary with links:
  - [net-next,1/4] mlxsw: spectrum: Add infrastructure for parsing configuration
    https://git.kernel.org/netdev/net-next/c/2d91f0803b84
  - [net-next,2/4] mlxsw: Convert existing consumers to use new API for parsing configuration
    https://git.kernel.org/netdev/net-next/c/0071e7cdc386
  - [net-next,3/4] mlxsw: Remove old parsing depth infrastructure
    https://git.kernel.org/netdev/net-next/c/c3d2ed93b14d
  - [net-next,4/4] mlxsw: spectrum_router: Increase parsing depth for multipath hash
    https://git.kernel.org/netdev/net-next/c/43c1b83305fa

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html