OSDN Git Service

mlxsw: spectrum_router: Increase parsing depth for multipath hash
authorAmit Cohen <amcohen@nvidia.com>
Sun, 22 Aug 2021 11:37:16 +0000 (14:37 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Aug 2021 20:39:55 +0000 (21:39 +0100)
commit43c1b83305fa7a6f1f66b37e98677958e4606c17
tree07ff613678fd44575c057c7d56a493713d9a5c9c
parentc3d2ed93b14d5300530549f08ef5c6b87bbaa5bb
mlxsw: spectrum_router: Increase parsing depth for multipath hash

Commit 01848e05f8bb ("mlxsw: spectrum_router: Add support for inner
layer 3 multipath hash policy") and commit daeabf89eb89 ("mlxsw:
spectrum_router: Add support for custom multipath hash policy") added
support for multipath hash policies where the hash is calculated based
on inner packet fields.

For IPv6-in-IPv6 packets, the default parsing depth (96 bytes) is not
enough when these policies are used.

Therefore, for such cases, call the new API to increase / decrease the
parsing depth as necessary. Care is taken to ensure the API is not
called multiple times.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h