OpenCloudOS-Kernel/drivers/net/ethernet/mellanox
Danielle Ratson b442f2ea84 mlxsw: spectrum_router: Consolidate MAC profiles when possible
Currently, when setting a router interface (RIF) MAC address while the
MAC profile is not shared with other RIFs, the profile is edited so that
the new MAC address is assigned to it.

This does not take into account a situation in which the new MAC address
already matches an existing MAC profile. In that situation, two MAC
profiles will be occupied even though they hold MAC addresses from the
same profile.

In order to prevent that, add a check to ensure that editing a MAC
profile takes place only when the new MAC address does not match an
existing profile.

Fixes: 605d25cd78 ("mlxsw: spectrum_router: Add RIF MAC profiles support")
Reported-by: Maksym Yaremchuk <maksymy@nvidia.com>
Tested-by: Maksym Yaremchuk <maksymy@nvidia.com>
Signed-off-by: Danielle Ratson <danieller@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-14 12:56:10 +00:00
..
mlx4 net/mlx4_en: Fix an use-after-free bug in mlx4_en_try_alloc_resources() 2021-12-01 19:04:50 -08:00
mlx5/core net/mlx5e: SHAMPO, Fix constant expression result 2021-11-30 22:35:06 -08:00
mlxbf_gige gpio updates for v5.16 2021-11-08 11:55:21 -08:00
mlxfw devlink: Reduce struct devlink exposure 2021-10-12 16:29:16 -07:00
mlxsw mlxsw: spectrum_router: Consolidate MAC profiles when possible 2021-12-14 12:56:10 +00:00
Kconfig Add Mellanox BlueField Gigabit Ethernet driver 2021-06-25 11:20:23 -07:00
Makefile Add Mellanox BlueField Gigabit Ethernet driver 2021-06-25 11:20:23 -07:00