[dpdk-dev,v2,7/7] net/mlx5: fix flow director flow add

Message ID 6cb4fb2594073f91702b710a65feebb13a3dc427.1508768946.git.nelio.laranjeiro@6wind.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Nélio Laranjeiro Oct. 23, 2017, 2:49 p.m. UTC
  Flows are added by priv_flow_create() in the associated list, adding them a
second time corrupts the list causing an infinite loop when parsing it.

Fixes: 4c3e9bcdd52e ("net/mlx5: support flow director")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_flow.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Yongseok Koh Oct. 23, 2017, 8:48 p.m. UTC | #1
> On Oct 23, 2017, at 7:49 AM, Nelio Laranjeiro <nelio.laranjeiro@6wind.com> wrote:
> 
> Flows are added by priv_flow_create() in the associated list, adding them a
> second time corrupts the list causing an infinite loop when parsing it.
> 
> Fixes: 4c3e9bcdd52e ("net/mlx5: support flow director")
> 
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> ---
Acked-by: Yongseok Koh <yskoh@mellanox.com>
 
Thanks
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 13b78ce9b..26cf593af 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2792,7 +2792,6 @@  priv_fdir_filter_add(struct priv *priv,
 				attributes.actions,
 				&error);
 	if (flow) {
-		TAILQ_INSERT_TAIL(&priv->flows, flow, next);
 		DEBUG("FDIR created %p", (void *)flow);
 		return 0;
 	}