Skip to content

Commit

Permalink
net/mlx5: fix drop action release timing
Browse files Browse the repository at this point in the history
[ upstream commit 22a3761b782b7c46ca428209b15b4f7382a40a62 ]

When creating the drop action Devx object, the global counter set
is also used as in the regular or hairpin queue creation.

The drop action should be destroyed before the global counter set
release procedure. Or else, the counter set object is still
referenced and cannot be released successfully. This would cause
the counter set resources to be exhausted after starting and stopping
the ports repeatedly.

Fixes: 65b3cd0 ("net/mlx5: create global drop action")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
  • Loading branch information
zorrohahaha authored and kevintraynor committed Apr 3, 2024
1 parent 165b252 commit 61aa88d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/mlx5/mlx5.c
Original file line number Diff line number Diff line change
Expand Up @@ -1605,12 +1605,12 @@ mlx5_dev_close(struct rte_eth_dev *dev)
priv->txqs = NULL;
}
mlx5_proc_priv_uninit(dev);
if (priv->drop_queue.hrxq)
mlx5_drop_action_destroy(dev);
if (priv->q_counters) {
mlx5_devx_cmd_destroy(priv->q_counters);
priv->q_counters = NULL;
}
if (priv->drop_queue.hrxq)
mlx5_drop_action_destroy(dev);
if (priv->mreg_cp_tbl)
mlx5_hlist_destroy(priv->mreg_cp_tbl);
mlx5_mprq_free_mp(dev);
Expand Down

0 comments on commit 61aa88d

Please sign in to comment.