patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/nfp: fix flow mask table entry problem
@ 2024-06-19  9:53 Chaoyong He
  2024-07-07 18:55 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Chaoyong He @ 2024-06-19  9:53 UTC (permalink / raw)
  To: dev; +Cc: oss-drivers, Chaoyong He, stable, Long Wu, Peng Zhang

The mask table entry using reference count to manage the flow rules
which have the same mask, and the new mask table entry will indicated by
flag 'NFP_FL_META_FLAG_MANAGE_MASK'.

The abuse of 'NFP_FL_META_FLAG_MANAGE_MASK' will cause the firmware
abnormal and the flow offload will not work.

Fixes: 7d18af7f6fdc ("net/nfp: support merged flows and conntrack stats")
Cc: stable@dpdk.org

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/flower/nfp_flower_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c
index 9b144e41d0..fad65c1785 100644
--- a/drivers/net/nfp/flower/nfp_flower_flow.c
+++ b/drivers/net/nfp/flower/nfp_flower_flow.c
@@ -317,14 +317,14 @@ nfp_check_mask_add(struct nfp_flow_priv *priv,
 		ret = nfp_mask_table_add(priv, mask_data, mask_len, mask_id);
 		if (ret != 0)
 			return false;
+
+		*meta_flags |= NFP_FL_META_FLAG_MANAGE_MASK;
 	} else {
 		/* Mask entry already exist */
 		mask_entry->ref_cnt++;
 		*mask_id = mask_entry->mask_id;
 	}
 
-	*meta_flags |= NFP_FL_META_FLAG_MANAGE_MASK;
-
 	return true;
 }
 
-- 
2.39.1


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

* Re: [PATCH] net/nfp: fix flow mask table entry problem
  2024-06-19  9:53 [PATCH] net/nfp: fix flow mask table entry problem Chaoyong He
@ 2024-07-07 18:55 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2024-07-07 18:55 UTC (permalink / raw)
  To: Chaoyong He, dev; +Cc: oss-drivers, stable, Long Wu, Peng Zhang

On 6/19/2024 10:53 AM, Chaoyong He wrote:
> The mask table entry using reference count to manage the flow rules
> which have the same mask, and the new mask table entry will indicated by
> flag 'NFP_FL_META_FLAG_MANAGE_MASK'.
> 
> The abuse of 'NFP_FL_META_FLAG_MANAGE_MASK' will cause the firmware
> abnormal and the flow offload will not work.
> 
> Fixes: 7d18af7f6fdc ("net/nfp: support merged flows and conntrack stats")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
> Reviewed-by: Long Wu <long.wu@corigine.com>
> Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
>

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

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

end of thread, other threads:[~2024-07-07 18:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-19  9:53 [PATCH] net/nfp: fix flow mask table entry problem Chaoyong He
2024-07-07 18:55 ` 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).