[dpdk-dev] [PATCH] net/mlx5: fix flow destruction

Yongseok Koh yskoh at mellanox.com
Thu Nov 15 06:24:13 CET 2018


As flow_drv_destroy() frees dev_flow, flow_rxq_flags_trim() must be called
ahead.

Fixes: 84c406e74524 ("net/mlx5: add flow translate function")
Cc: orika at mellanox.com

Signed-off-by: Yongseok Koh <yskoh at mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 5ad3a11ab7..01499c462a 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2127,14 +2127,14 @@ static void
 flow_list_destroy(struct rte_eth_dev *dev, struct mlx5_flows *list,
 		  struct rte_flow *flow)
 {
-	flow_drv_destroy(dev, flow);
-	TAILQ_REMOVE(list, flow, next);
 	/*
 	 * Update RX queue flags only if port is started, otherwise it is
 	 * already clean.
 	 */
 	if (dev->data->dev_started)
 		flow_rxq_flags_trim(dev, flow);
+	flow_drv_destroy(dev, flow);
+	TAILQ_REMOVE(list, flow, next);
 	rte_free(flow->fdir);
 	rte_free(flow);
 }
-- 
2.11.0



More information about the dev mailing list