From: Gregory Etelson <getelson@nvidia.com>
To: <dev@dpdk.org>
Cc: getelson@nvidia.com, <mkashani@nvidia.com>,
rasland@nvidia.com, stable@dpdk.org,
"Suanming Mou" <suanmingm@nvidia.com>,
"Matan Azrad" <matan@nvidia.com>,
"Viacheslav Ovsiienko" <viacheslavo@nvidia.com>,
"Ori Kam" <orika@nvidia.com>
Subject: [PATCH v3 10/16] net/mlx5: fix in shared counter and age template action create
Date: Tue, 17 Oct 2023 11:09:22 +0300 [thread overview]
Message-ID: <20231017080928.30454-11-getelson@nvidia.com> (raw)
In-Reply-To: <20231017080928.30454-1-getelson@nvidia.com>
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
prev parent reply other threads:[~2023-10-17 8:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230927191046.405282-1-getelson@nvidia.com>
[not found] ` <20231016184235.200427-1-getelson@nvidia.com>
2023-10-16 18:42 ` [PATCH v2 " Gregory Etelson
[not found] ` <20231017080928.30454-1-getelson@nvidia.com>
2023-10-17 8:09 ` Gregory Etelson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231017080928.30454-11-getelson@nvidia.com \
--to=getelson@nvidia.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=mkashani@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=stable@dpdk.org \
--cc=suanmingm@nvidia.com \
--cc=viacheslavo@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).