diff options
author | Mark Bloch <mbloch@nvidia.com> | 2022-03-22 15:58:02 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2022-05-03 07:21:16 +0300 |
commit | 3a09fae035c879c7ae8e5e154d7b03ddf0de5f20 (patch) | |
tree | 86b13ff4f94bbe1d9a916786ad838de957691398 /drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | |
parent | 72191a4cd5250bc39e431ad1a2ad3b4fb3c52d2e (diff) | |
download | linux-3a09fae035c879c7ae8e5e154d7b03ddf0de5f20.tar.xz |
net/mlx5: fs, an FTE should have no dests when deleted
When deleting an FTE it should have no dests, which means
fte->dests_size should be 0. Add a WARN_ON() to catch bugs
where the proper tracking wasn't done.
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/fs_core.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c index d512445c7627..fb8175672478 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c @@ -605,6 +605,7 @@ static void del_hw_fte(struct fs_node *node) fs_get_obj(ft, fg->node.parent); trace_mlx5_fs_del_fte(fte); + WARN_ON(fte->dests_size); dev = get_dev(&ft->node); root = find_root(&ft->node); if (node->active) { |