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)
commit5d0512e5cf7482998dab45273c6542b4c25155aa
tree46809872a62ad4f8b550e53b5d911cccf89fc7ad
parent0ac985436eb99056e8248b12caa4b006ed93d8b3
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