net/mlx5: fix the drop action memory leak
PATCH 1/1 net/mlx5: fix the drop action memory leak
In DV mode, when quitting an application, the default drop action and its resources should be released. The Devx action for the TIR was not destroyed and it would cause 80B memory leak.
With this commit, in DV mode, the action should be destroyed in the mlx5_devx_drop_action_destroy() explicitly.
Bugzilla ID: 1192
Bugzilla ID: 1255
--- drivers/net/mlx5/mlx5_devx.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/mlx5/mlx5_devx.c +4 -0
@@ -1134,6 +1134,10 @@ mlx5_devx_drop_action_destroy(struct rte_eth_dev *dev)struct mlx5_priv *priv = dev->data->dev_private;struct mlx5_hrxq *hrxq = priv->drop_queue.hrxq; +#if defined(HAVE_IBV_FLOW_DV_SUPPORT ) || !defined(HAVE_INFINIBAND_VERBS_H ) +if (hrxq->action !=NULL ) +mlx5_flow_os_destroy_flow_action (hrxq->action); +#endif if (hrxq->tir !=NULL )mlx5_devx_tir_destroy (hrxq);if (hrxq->ind_table->ind_table !=NULL )
Signature · 1 line
2.34.1
PATCH v2 1/1 net/mlx5: fix the drop action memory leak
In DV mode, when quitting an application, the default drop action and its resources should be released. The Devx action for the TIR was not destroyed and it would cause 80B memory leak.
With this commit, in DV mode, the action should be destroyed in the mlx5_devx_drop_action_destroy() explicitly.
Bugzilla ID: 1192
Bugzilla ID: 1255
---
v2: added the reporter
--- drivers/net/mlx5/mlx5_devx.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/mlx5/mlx5_devx.c +4 -0
@@ -1134,6 +1134,10 @@ mlx5_devx_drop_action_destroy(struct rte_eth_dev *dev)struct mlx5_priv *priv = dev->data->dev_private;struct mlx5_hrxq *hrxq = priv->drop_queue.hrxq; +#if defined(HAVE_IBV_FLOW_DV_SUPPORT ) || !defined(HAVE_INFINIBAND_VERBS_H ) +if (hrxq->action !=NULL ) +mlx5_flow_os_destroy_flow_action (hrxq->action); +#endif if (hrxq->tir !=NULL )mlx5_devx_tir_destroy (hrxq);if (hrxq->ind_table->ind_table !=NULL )
Signature · 1 line
2.34.1
,
x
Quoted 23 lines
-----Original Message-----
From: Bing Zhao <[email protected]>
Sent: Thursday, July 13, 2023 2:20 PM
To: Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; Raslan Darawsheh <[email protected]>
Cc: [email protected]; [email protected]; David Marchand <[email protected]>; Mário Kuka <[email protected]>
Subject: [PATCH v2] net/mlx5: fix the drop action memory leakIn DV mode, when quitting an application, the default drop action and its resources should be released. The Devx action for the TIR was not destroyed and it would cause 80B memory leak.
With this commit, in DV mode, the action should be destroyed in the
mlx5_devx_drop_action_destroy()explicitly.Bugzilla ID: 1192
Bugzilla ID: 1255Fixes bc5bee028ebc ("net/mlx5: create drop queue using DevX")
Quoted 6 lines
Reported-by David Marchand <[email protected]>Reported-by Mário Kuka<[email protected]>Signed-off-by Bing Zhao <[email protected]>---
v2: added the reporter
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh