]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_ipip: Split accessor functions
authorPetr Machata <petrm@mellanox.com>
Fri, 3 Nov 2017 09:03:32 +0000 (10:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 4 Nov 2017 00:15:17 +0000 (09:15 +0900)
commit01a64ec4fa7a8516674864a2e6175b58083f4b95
tree5eaa7a1346b31f7f3ebc1cf1a910664a36ecf2e0
parent1a95417e33b5ade76effdbf352786640d9e63e54
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 <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>
drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h