]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mlxsw: spectrum: Add an option to flood mc by mc_router_port
authorNogah Frankel <nogahf@mellanox.com>
Thu, 9 Feb 2017 13:54:47 +0000 (14:54 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Feb 2017 16:46:40 +0000 (11:46 -0500)
commit8ecd4591e7612a7ea5c67589cf1a7f18bd17ba14
treee7d2a7196afa312af9fa7379afd8a4a7ca7360ae
parent71c365bdc4396893798c8e1c9247663096ff4829
mlxsw: spectrum: Add an option to flood mc by mc_router_port

The decision whether to flood a multicast packet to a port dependent
on three flags: mc_disabled, mc_router_port, mc_flood.

If mc_disabled is on, the port will be flooded according to mc_flood,
otherwise, according to mc_router_port. To accomplish that, add those
flags into the mlxsw_sp_port struct and update the mc flood table
accordingly.

Update mc_router_port by switchdev attribute
SWITCHDEV_ATTR_ID_PORT_MC_ROUTER_PORT.

Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Signed-off-by: Yotam Gigi <yotamg@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.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c