patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: fix wrong decap action checking in sample flow
@ 2023-10-11  6:36 Jiawei Wang
  2023-10-25 10:46 ` Raslan Darawsheh
  0 siblings, 1 reply; 2+ messages in thread
From: Jiawei Wang @ 2023-10-11  6:36 UTC (permalink / raw)
  To: suanmingm, viacheslavo; +Cc: dev, rasland, stable

This patch uses the temp variable to check the current action type,
to avoid overlap  the sample action following the decap.

Fixes: 7356aec64c48 ("net/mlx5: fix mirror flow split with L3 encapsulation")
Cc: stable@dpdk.org

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 8ad85e6027..772f6afb66 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -6159,6 +6159,7 @@ flow_check_match_action(const struct rte_flow_action actions[],
 {
 	const struct rte_flow_action_sample *sample;
 	const struct rte_flow_action_raw_decap *decap;
+	const struct rte_flow_action *action_cur = NULL;
 	int actions_n = 0;
 	uint32_t ratio = 0;
 	int sub_type = 0;
@@ -6219,12 +6220,12 @@ flow_check_match_action(const struct rte_flow_action actions[],
 			break;
 		case RTE_FLOW_ACTION_TYPE_RAW_DECAP:
 			decap = actions->conf;
-			while ((++actions)->type == RTE_FLOW_ACTION_TYPE_VOID)
+			action_cur = actions;
+			while ((++action_cur)->type == RTE_FLOW_ACTION_TYPE_VOID)
 				;
-			actions_n++;
-			if (actions->type == RTE_FLOW_ACTION_TYPE_RAW_ENCAP) {
+			if (action_cur->type == RTE_FLOW_ACTION_TYPE_RAW_ENCAP) {
 				const struct rte_flow_action_raw_encap *encap =
-								actions->conf;
+								action_cur->conf;
 				if (decap->size <=
 					MLX5_ENCAPSULATION_DECISION_SIZE &&
 				    encap->size >
-- 
2.18.1


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

* RE: [PATCH] net/mlx5: fix wrong decap action checking in sample flow
  2023-10-11  6:36 [PATCH] net/mlx5: fix wrong decap action checking in sample flow Jiawei Wang
@ 2023-10-25 10:46 ` Raslan Darawsheh
  0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2023-10-25 10:46 UTC (permalink / raw)
  To: Jiawei(Jonny) Wang, Suanming Mou, Slava Ovsiienko; +Cc: dev, stable

Hi,
> -----Original Message-----
> From: Jiawei(Jonny) Wang <jiaweiw@nvidia.com>
> Sent: Wednesday, October 11, 2023 9:37 AM
> To: Suanming Mou <suanmingm@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>
> Cc: dev@dpdk.org; Raslan Darawsheh <rasland@nvidia.com>;
> stable@dpdk.org
> Subject: [PATCH] net/mlx5: fix wrong decap action checking in sample flow
> 
> This patch uses the temp variable to check the current action type, to avoid
> overlap  the sample action following the decap.
> 
> Fixes: 7356aec64c48 ("net/mlx5: fix mirror flow split with L3 encapsulation")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
> Acked-by: Suanming Mou <suanmingm@nvidia.com>

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh


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

end of thread, other threads:[~2023-10-25 10:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-11  6:36 [PATCH] net/mlx5: fix wrong decap action checking in sample flow Jiawei Wang
2023-10-25 10:46 ` Raslan Darawsheh

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).