]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_switchdev: Add support for maintaining hash table of MDB entries
authorAmit Cohen <amcohen@nvidia.com>
Wed, 29 Jun 2022 09:40:02 +0000 (12:40 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Jun 2022 12:35:46 +0000 (13:35 +0100)
commite263e6529427695881742b234c141735652c67e3
tree46809872a62ad4f8b550e53b5d911cccf89fc7ad
parent6bf304975cdf04aefa9337ae2f82b20cbf747b70
mlxsw: spectrum_switchdev: Add support for maintaining hash table of MDB entries

Currently MDB entries are stored in a list as part of
'struct mlxsw_sp_bridge_device'. Storing them in a hash table in
addition to the list will allow finding a specific entry more efficiently.

Add support for the required hash table, the next patches will insert
and remove MDB entries from the table. The existing code which adds and
removes entries will be removed and replaced by new code in the next
patches, so there is no point to adjust the existing code.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c