net/mlx5e: Warn when destroying mod hdr hash table that is not empty

To avoid memory leaks add a warn when destroying mod hdr hash table
but the hash table is not empty.

Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
Roi Dayan 2022-09-22 11:03:30 +03:00 committed by Saeed Mahameed
parent ef78b8d5d6
commit 2a1f4fed39

View file

@ -47,6 +47,7 @@ void mlx5e_mod_hdr_tbl_init(struct mod_hdr_tbl *tbl)
void mlx5e_mod_hdr_tbl_destroy(struct mod_hdr_tbl *tbl)
{
WARN_ON(!hash_empty(tbl->hlist));
mutex_destroy(&tbl->lock);
}