Thread (4 messages) 4 messages, 2 authors, 2017-02-01
STALE3415d REVIEWED: 1 (0M)

[PATCH 3/3] net/mlx5: fix flow rule creation if ports are stopped

From: Nelio Laranjeiro <hidden>
Date: 2017-01-31 16:03:50
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

Adding a flow when the port is stopped ends in an inconsistent situation
where the queue can receive traffic when it should not.
Record new rules and apply them as soon as the port is started.

Fixes: 2097d0d1e2cc ("net/mlx5: support basic flow items and actions")

Signed-off-by: Nelio Laranjeiro <redacted>
Acked-by: Adrien Mazarguil <redacted>
---
 drivers/net/mlx5/mlx5_flow.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 34ac5d3..23c1b5e 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -948,6 +948,8 @@ priv_flow_create_action_queue(struct priv *priv,
 				   NULL, "cannot allocate QP");
 		goto error;
 	}
+	if (!priv->started)
+		return rte_flow;
 	rte_flow->ibv_flow = ibv_exp_create_flow(rte_flow->qp,
 						 rte_flow->ibv_attr);
 	if (!rte_flow->ibv_flow) {
-- 
2.1.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help