]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Fix incorrect reuse of MID entries
authorIdo Schimmel <idosch@mellanox.com>
Sun, 30 Oct 2016 09:09:22 +0000 (10:09 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 31 Oct 2016 19:34:43 +0000 (15:34 -0400)
commit198ba514a0bab92ae8f68044056b6d1c0d52a79e
tree122aab319e53744db8b5b9f2c1f60678b7dadf72
parentb62cf31fbf3efca7d554c7dc011523ed6b1c6f67
mlxsw: spectrum: Fix incorrect reuse of MID entries

In the device, a MID entry represents a group of local ports, which can
later be bound to a MDB entry.

The lookup of an existing MID entry is currently done using the provided
MC MAC address and VID, from the Linux bridge. However, this can result
in an incorrect reuse of the same MID index in different VLAN-unaware
bridges (same IP MC group and VID 0).

Fix this by performing the lookup based on FID instead of VID, which is
unique across different bridges.

Fixes: 60e5b8ac0b6c ("mlxsw: Adding layer 2 multicast support")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Elad Raz <eladr@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.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c