aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h
diff options
context:
space:
mode:
authorAmit Cohen <amitc@mellanox.com>2020-01-19 15:00:52 +0200
committerDavid S. Miller <davem@davemloft.net>2020-01-19 16:23:52 +0100
commit4a44ee67a7cd6603d28d71f8fe5e4e0e4dfae1e5 (patch)
tree22a8bac8503f5d374accbd70b2a88e7ef762ad60 /drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h
parentmlxsw: reg: Add Tunneling IPinIP Decapsulation ECN Mapping Register (diff)
downloadlinux-dev-4a44ee67a7cd6603d28d71f8fe5e4e0e4dfae1e5.tar.xz
linux-dev-4a44ee67a7cd6603d28d71f8fe5e4e0e4dfae1e5.zip
mlxsw: Add ECN configurations with IPinIP tunnels
Initialize ECN mapping registers during router init according to INET_ECN_encapsulate() and INET_ECN_decapsulate(). For IP-in-IP encapsulation, this is required to ensure that ECN bits in the underlay are set in accordance with the kernel. For decapsulation, this is required to ensure that packets with invalid ECN combination in underlay and overlay are trapped to the kernel and not forwarded. Signed-off-by: Amit Cohen <amitc@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h
index cc1de91e8217..c9b94f435cdd 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h
@@ -104,4 +104,7 @@ static inline bool mlxsw_sp_l3addr_eq(const union mlxsw_sp_l3addr *addr1,
return !memcmp(addr1, addr2, sizeof(*addr1));
}
+int mlxsw_sp_ipip_ecn_encap_init(struct mlxsw_sp *mlxsw_sp);
+int mlxsw_sp_ipip_ecn_decap_init(struct mlxsw_sp *mlxsw_sp);
+
#endif /* _MLXSW_ROUTER_H_*/