diff options
author | Amit Cohen <amitc@mellanox.com> | 2020-01-19 16:00:52 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-19 18:23:52 +0300 |
commit | 4a44ee67a7cd6603d28d71f8fe5e4e0e4dfae1e5 (patch) | |
tree | 22a8bac8503f5d374accbd70b2a88e7ef762ad60 /drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h | |
parent | 839607e2ec8dbe7c3e43995921dae487976e8899 (diff) | |
download | linux-4a44ee67a7cd6603d28d71f8fe5e4e0e4dfae1e5.tar.xz |
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 'drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h | 3 |
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_*/ |