From 6eddd9d65b766cde3ac34f5d733a34258de9017e Mon Sep 17 00:00:00 2001 From: =?utf8?q?N=C3=A9lio=20Laranjeiro?= Date: Thu, 15 Jun 2017 10:25:16 +0200 Subject: [PATCH] net/mlx5: fix creation of drop flows Drop flows being created when the port is stop should not access to the drop table hash queues as it is invalid. Fixes: 028761059aeb ("net/mlx5: use an RSS drop queue") Cc: stable@dpdk.org Signed-off-by: Nelio Laranjeiro Acked-by: Shahaf Shuler --- drivers/net/mlx5/mlx5_flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index bbfa85c2f0..b7b7c8356c 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1015,7 +1015,6 @@ priv_flow_create_action_queue_drop(struct priv *priv, return NULL; } rte_flow->drop = 1; - rte_flow->qp = priv->flow_drop_queue->qp; #ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP drop = (void *)((uintptr_t)flow->ibv_attr + flow->offset); *drop = (struct ibv_exp_flow_spec_action_drop){ @@ -1028,6 +1027,7 @@ priv_flow_create_action_queue_drop(struct priv *priv, rte_flow->ibv_attr = flow->ibv_attr; if (!priv->started) return rte_flow; + rte_flow->qp = priv->flow_drop_queue->qp; rte_flow->ibv_flow = ibv_exp_create_flow(rte_flow->qp, rte_flow->ibv_attr); if (!rte_flow->ibv_flow) { -- 2.20.1