patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH v2 10/16] net/mlx5: fix in shared counter and age template action create
       [not found] ` <20231016184235.200427-1-getelson@nvidia.com>
@ 2023-10-16 18:42   ` Gregory Etelson
  0 siblings, 0 replies; 2+ messages in thread
From: Gregory Etelson @ 2023-10-16 18:42 UTC (permalink / raw)
  To: dev
  Cc: getelson,  ,
	  . .
	/patches/upstream-pmd-indirect-actions-list/v2/v2-0000-cover-letter
	. patch, stable, Matan Azrad, Viacheslav Ovsiienko, Ori Kam,
	Suanming Mou

Count and age actions in HWS template are translated into the same
DR5 action.
PMD maintains dedicated variable - `cnt_off`, that points
action location in DR5 array.

Currnet PMD did not initialize the `cnt_off` variable during
shared counter / age actions initialization.

Fixes: feb1f2fe2b76 ("net/mlx5: reformat HWS code")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 910d42a5f5..efb2d512b7 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -4680,10 +4680,12 @@ flow_hw_dr_actions_template_handle_shared(const struct rte_flow_action *mask,
 		 * Both AGE and COUNT action need counter, the first one fills
 		 * the action_types array, and the second only saves the offset.
 		 */
-		if (*cnt_off == UINT16_MAX)
+		if (*cnt_off == UINT16_MAX) {
+			*cnt_off = *curr_off;
 			action_template_set_type(at, action_types,
 						 action_src, curr_off,
 						 MLX5DR_ACTION_TYP_CTR);
+		}
 		at->actions_off[action_src] = *cnt_off;
 		break;
 	case RTE_FLOW_ACTION_TYPE_CONNTRACK:
-- 
2.39.2


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

* [PATCH v3 10/16] net/mlx5: fix in shared counter and age template action create
       [not found] ` <20231017080928.30454-1-getelson@nvidia.com>
@ 2023-10-17  8:09   ` Gregory Etelson
  0 siblings, 0 replies; 2+ messages in thread
From: Gregory Etelson @ 2023-10-17  8:09 UTC (permalink / raw)
  To: dev
  Cc: getelson,  ,
	rasland, stable, Suanming Mou, Matan Azrad, Viacheslav Ovsiienko,
	Ori Kam

Count and age actions in HWS template are translated into the same
DR5 action.
PMD maintains dedicated variable - `cnt_off`, that points
action location in DR5 array.

Currnet PMD did not initialize the `cnt_off` variable during
shared counter / age actions initialization.

Fixes: feb1f2fe2b76 ("net/mlx5: reformat HWS code")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 910d42a5f5..efb2d512b7 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -4680,10 +4680,12 @@ flow_hw_dr_actions_template_handle_shared(const struct rte_flow_action *mask,
 		 * Both AGE and COUNT action need counter, the first one fills
 		 * the action_types array, and the second only saves the offset.
 		 */
-		if (*cnt_off == UINT16_MAX)
+		if (*cnt_off == UINT16_MAX) {
+			*cnt_off = *curr_off;
 			action_template_set_type(at, action_types,
 						 action_src, curr_off,
 						 MLX5DR_ACTION_TYP_CTR);
+		}
 		at->actions_off[action_src] = *cnt_off;
 		break;
 	case RTE_FLOW_ACTION_TYPE_CONNTRACK:
-- 
2.39.2


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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230927191046.405282-1-getelson@nvidia.com>
     [not found] ` <20231016184235.200427-1-getelson@nvidia.com>
2023-10-16 18:42   ` [PATCH v2 10/16] net/mlx5: fix in shared counter and age template action create Gregory Etelson
     [not found] ` <20231017080928.30454-1-getelson@nvidia.com>
2023-10-17  8:09   ` [PATCH v3 " Gregory Etelson

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