ipmr, ip6mr: Make mfc_cache a common structure
authorYuval Mintz <yuvalm@mellanox.com>
Wed, 28 Feb 2018 21:29:34 +0000 (23:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Mar 2018 18:13:23 +0000 (13:13 -0500)
commit494fff56379c4ad5b8fe36a5b7ffede4044ca7bb
tree700668965ff3ae706986235f91bb8c5267017617
parent0bbbf0e7d0e7ea8267836986346a9b3a35b74e4e
ipmr, ip6mr: Make mfc_cache a common structure

mfc_cache and mfc6_cache are almost identical - the main difference is
in the origin/group addresses and comparison-key. Make a common
structure encapsulating most of the multicast routing logic  - mr_mfc
and convert both ipmr and ip6mr into using it.

For easy conversion [casting, in this case] mr_mfc has to be the first
field inside every multicast routing abstraction utilizing it.

Signed-off-by: Yuval Mintz <yuvalm@mellanox.com>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c
include/linux/mroute.h
include/linux/mroute6.h
include/linux/mroute_base.h
net/ipv4/ipmr.c
net/ipv6/ip6mr.c