From: Yongseok Koh Date: Thu, 15 Nov 2018 05:24:13 +0000 (+0000) Subject: net/mlx5: fix flow destruction X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=57e1073bdc00f3b76af959a66816141dce9d0b05;p=dpdk.git net/mlx5: fix flow destruction As flow_drv_destroy() frees dev_flow, flow_rxq_flags_trim() must be called ahead. Fixes: 84c406e74524 ("net/mlx5: add flow translate function") Signed-off-by: Yongseok Koh Acked-by: Shahaf Shuler --- 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); }