mlxsw: spectrum_mr: Convert into using mr_mfc
authorYuval Mintz <yuvalm@mellanox.com>
Mon, 26 Mar 2018 12:01:41 +0000 (15:01 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 26 Mar 2018 17:14:44 +0000 (13:14 -0400)
commit4caef4638f0bea78aa1625ad7fa20df5076d17bf
tree3d73358ca982e346c99a07e21ca8085f90feed3f
parent9742f866bd82f6a7fc3dafa538bd0fa2a73a1e5f
mlxsw: spectrum_mr: Convert into using mr_mfc

Current multicast routing logic in driver assumes it's always meant to
deal with IPv4 multicast routes, leaving several placeholders for
later IPv6 support [currently usually WARN()].

This patch changes the driver's internal multicast route struct into
holding a common mr_mfc instead of the IPv4 mfc_cache.
The various placeholders are grouped into 2:
  - Functions that require only the common bits; These remain and the
    restriction for IPv4-only is lifted.
  - Function that require IPv4-specifics - for handling these functions
    we add sets of operations that encapsulate the protocol differences

Signed-off-by: Yuval Mintz <yuvalm@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_mr.c