[dpdk-dev] net/mlx5: fix flow director deletion

Message ID b1e66db2ee6a10100bfb97ec7c7793dd30b0941c.1510568681.git.nelio.laranjeiro@6wind.com (mailing list archive)
State Accepted, 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 Nov. 13, 2017, 10:25 a.m. UTC
  The speciation are wrongly computed causing the rule to not be match
correctly for deletion.

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

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

Comments

Yongseok Koh Nov. 13, 2017, 4:56 p.m. UTC | #1
> On Nov 13, 2017, at 4:25 AM, Nelio Laranjeiro <nelio.laranjeiro@6wind.com> wrote:
> 
> The speciation are wrongly computed causing the rule to not be match
> correctly for deletion.
> 
> Fixes: 4c3e9bcdd52e ("net/mlx5: support flow director")
> 
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> ---

There's a typo in the commit message, speciation -> specification.
Except for that,

Acked-by: Yongseok Koh <yskoh@mellanox.com>
 
Thanks
  
Thomas Monjalon Nov. 14, 2017, 7:56 a.m. UTC | #2
13/11/2017 17:56, Yongseok Koh:
> 
> > On Nov 13, 2017, at 4:25 AM, Nelio Laranjeiro <nelio.laranjeiro@6wind.com> wrote:
> > 
> > The speciation are wrongly computed causing the rule to not be match
> > correctly for deletion.
> > 
> > Fixes: 4c3e9bcdd52e ("net/mlx5: support flow director")
> > 
> > Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> > ---
> 
> There's a typo in the commit message, speciation -> specification.
> Except for that,
> 
> Acked-by: Yongseok Koh <yskoh@mellanox.com>

Applied, thanks
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 3df8fba4e..466d74b5f 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2915,8 +2915,8 @@  priv_fdir_filter_delete(struct priv *priv,
 			if (memcmp(spec, flow_spec,
 				   RTE_MIN(attr_h->size, flow_h->size)))
 				goto wrong_flow;
-			spec = (void *)((uintptr_t)attr + attr_h->size);
-			flow_spec = (void *)((uintptr_t)flow_attr +
+			spec = (void *)((uintptr_t)spec + attr_h->size);
+			flow_spec = (void *)((uintptr_t)flow_spec +
 					     flow_h->size);
 		}
 		/* At this point, the flow match. */