From 9fb7bd77d11ab03b4a969279de9f54d8fd6fe988 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Fri, 3 Nov 2017 10:03:32 +0100 Subject: mlxsw: spectrum_ipip: Split accessor functions To implement NETDEV_CHANGE notifications on IP-in-IP tunnels, the handler needs to figure out what actually changed, to understand how exactly to update the offloads. It will do so by storing struct ip_tunnel_parm with previous configuration, and comparing that to the new version. To facilitate these comparisons, extract the code that operates on struct ip_tunnel_parm from the existing accessor functions, and make those a thin wrapper that extracts tunnel parameters and dispatches. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h') diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h index 87becd152a5c..918d74b4e8d7 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h @@ -38,6 +38,9 @@ #include "spectrum_router.h" #include +struct ip_tunnel_parm +mlxsw_sp_ipip_netdev_parms(const struct net_device *ol_dev); + union mlxsw_sp_l3addr mlxsw_sp_ipip_netdev_saddr(enum mlxsw_sp_l3proto proto, const struct net_device *ol_dev); -- cgit v1.2.3