DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: fix flow director rules comparison
@ 2017-11-09 12:43 Nelio Laranjeiro
  2017-11-10  8:37 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Nelio Laranjeiro @ 2017-11-09 12:43 UTC (permalink / raw)
  To: dev; +Cc: Yongseok Koh, Adrien Mazarguil

When deleting/replacing a flow director rule the first rule of the list was
always the one replaced instead of the corresponding one.

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

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

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index cd99cb075..3df8fba4e 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2914,13 +2914,16 @@ priv_fdir_filter_delete(struct priv *priv,
 			flow_h = flow_spec;
 			if (memcmp(spec, flow_spec,
 				   RTE_MIN(attr_h->size, flow_h->size)))
-				continue;
+				goto wrong_flow;
 			spec = (void *)((uintptr_t)attr + attr_h->size);
 			flow_spec = (void *)((uintptr_t)flow_attr +
 					     flow_h->size);
 		}
 		/* At this point, the flow match. */
 		break;
+wrong_flow:
+		/* The flow does not match. */
+		continue;
 	}
 	if (flow)
 		priv_flow_destroy(priv, &priv->flows, flow);
-- 
2.11.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: fix flow director rules comparison
  2017-11-09 12:43 [dpdk-dev] [PATCH] net/mlx5: fix flow director rules comparison Nelio Laranjeiro
@ 2017-11-10  8:37 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2017-11-10  8:37 UTC (permalink / raw)
  To: Nelio Laranjeiro, dev; +Cc: Yongseok Koh, Adrien Mazarguil

On 11/9/2017 4:43 AM, Nelio Laranjeiro wrote:
> When deleting/replacing a flow director rule the first rule of the list was
> always the one replaced instead of the corresponding one.
> 
> Fixes: 4c3e9bcdd52e ("net/mlx5: support flow director")
> 
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

Applied to dpdk/master, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-10  8:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-09 12:43 [dpdk-dev] [PATCH] net/mlx5: fix flow director rules comparison Nelio Laranjeiro
2017-11-10  8:37 ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).