[dpdk-dev] net/mlx5: fix creation of drop flows

Message ID 3939c03cb081af386ad990f5efb2b0758623ac6f.1497515081.git.nelio.laranjeiro@6wind.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation fail Compilation issues

Commit Message

Nélio Laranjeiro June 15, 2017, 8:25 a.m. UTC
  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")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ferruh Yigit June 15, 2017, 12:34 p.m. UTC | #1
On 6/15/2017 9:25 AM, Nelio Laranjeiro wrote:
> 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")
> 
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> Acked-by: Shahaf Shuler <shahafs@mellanox.com>

Applied to dpdk-next-net/master, thanks.

This required solving merge conflict, although it looks simple, can you
please confirm the final commit.
  
Nélio Laranjeiro June 15, 2017, 12:50 p.m. UTC | #2
On Thu, Jun 15, 2017 at 01:34:31PM +0100, Ferruh Yigit wrote:
> On 6/15/2017 9:25 AM, Nelio Laranjeiro wrote:
> > 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")
> > 
> > Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> > Acked-by: Shahaf Shuler <shahafs@mellanox.com>
> 
> Applied to dpdk-next-net/master, thanks.
> 
> This required solving merge conflict, although it looks simple, can you
> please confirm the final commit.

it is good for me.

Thanks Ferruh,
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 8b3957b..96bbf42 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1004,9 +1004,9 @@  priv_flow_create_action_queue_drop(struct priv *priv,
 	}
 	rte_flow->drop = 1;
 	rte_flow->ibv_attr = flow->ibv_attr;
-	rte_flow->qp = priv->flow_drop_queue->qp;
 	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) {