diff options
author | Petr Machata <petrm@mellanox.com> | 2017-09-02 23:49:19 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-03 20:23:25 -0700 |
commit | 6ddb7426a7d4429c9df9dada9ebc0cc396d31cc4 (patch) | |
tree | 0fad1599379a7807287c0b6f009e8a0a39523570 /drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h | |
parent | 010cadf916a5112a2de1642301917f4139104d46 (diff) | |
download | linux-stable-6ddb7426a7d4429c9df9dada9ebc0cc396d31cc4.tar.gz linux-stable-6ddb7426a7d4429c9df9dada9ebc0cc396d31cc4.tar.bz2 linux-stable-6ddb7426a7d4429c9df9dada9ebc0cc396d31cc4.zip |
mlxsw: spectrum_router: Introduce loopback RIFs
When offloading L3 tunnels, an adjacency entry is created that loops the
packet back into the underlay router. Loopback interfaces then hold the
corresponding information and are created for IP-in-IP netdevices.
Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@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 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h index 67c6c1d5ac93..a5732aa87b9a 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h @@ -36,12 +36,25 @@ #define _MLXSW_ROUTER_H_ #include "spectrum.h" +#include "reg.h" enum mlxsw_sp_l3proto { MLXSW_SP_L3_PROTO_IPV4, MLXSW_SP_L3_PROTO_IPV6, }; +union mlxsw_sp_l3addr { + __be32 addr4; + struct in6_addr addr6; +}; + +struct mlxsw_sp_rif_ipip_lb_config { + enum mlxsw_reg_ritr_loopback_ipip_type lb_ipipt; + u32 okey; + enum mlxsw_sp_l3proto ul_protocol; /* Underlay. */ + union mlxsw_sp_l3addr saddr; +}; + enum mlxsw_sp_rif_counter_dir { MLXSW_SP_RIF_COUNTER_INGRESS, MLXSW_SP_RIF_COUNTER_EGRESS, |