summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h
diff options
context:
space:
mode:
authorAmit Cohen <amcohen@nvidia.com>2021-09-23 15:36:59 +0300
committerDavid S. Miller <davem@davemloft.net>2021-09-24 12:26:52 +0300
commit8d4f10463cd67cd5a7aeff74af0a91cc07f94fd8 (patch)
tree33ea89c3851053bbcc446784dab4de71ef42245f /drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h
parent53eedd61dea9e4a64f2ede6b983c7de0df91392c (diff)
downloadlinux-8d4f10463cd67cd5a7aeff74af0a91cc07f94fd8.tar.xz
mlxsw: spectrum_router: Increase parsing depth for IPv6 decapsulation
The Spectrum ASIC has a configurable limit on how deep into the packet it parses. By default, the limit is 96 bytes. For IP-in-IP packets, with IPv6 outer and inner headers, the default parsing depth is not enough and without increasing it such packets cannot be properly decapsulated. Use the existing API to set parsing depth, call it once for each decapsulation entry when it is created/destroyed. There is no need to protect the code with new mutex because 'router->lock' is already taken in these code paths. Signed-off-by: Amit Cohen <amcohen@nvidia.com> Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h
index 5d93337b9a2d..2444f09d3fb1 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h
@@ -46,6 +46,7 @@ struct mlxsw_sp_ipip_entry {
struct mlxsw_sp_ipip_ops {
int dev_type;
enum mlxsw_sp_l3proto ul_proto; /* Underlay. */
+ bool inc_parsing_depth;
struct mlxsw_sp_ipip_parms
(*parms_init)(const struct net_device *ol_dev);