OSDN Git Service

mlxsw: Add ECN configurations with IPinIP tunnels
authorAmit Cohen <amitc@mellanox.com>
Sun, 19 Jan 2020 13:00:52 +0000 (15:00 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 19 Jan 2020 15:23:52 +0000 (16:23 +0100)
commit4a44ee67a7cd6603d28d71f8fe5e4e0e4dfae1e5
tree22a8bac8503f5d374accbd70b2a88e7ef762ad60
parent839607e2ec8dbe7c3e43995921dae487976e8899
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>
drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h