From: Kevin Traynor <ktraynor@redhat.com>
To: Shun Hao <shunh@nvidia.com>
Cc: Matan Azrad <matan@nvidia.com>, dpdk stable <stable@dpdk.org>
Subject: patch 'net/mlx5: fix meter policy creation assert' has been queued to stable release 21.11.1
Date: Thu, 10 Mar 2022 12:11:17 +0000 [thread overview]
Message-ID: <20220310121127.1324802-11-ktraynor@redhat.com> (raw)
In-Reply-To: <20220310121127.1324802-1-ktraynor@redhat.com>
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/14/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/3bd5cf393d0ab0152596bf2d0d8a8c2270a047d5
Thanks.
Kevin
---
From 3bd5cf393d0ab0152596bf2d0d8a8c2270a047d5 Mon Sep 17 00:00:00 2001
From: Shun Hao <shunh@nvidia.com>
Date: Wed, 2 Mar 2022 12:33:01 +0200
Subject: [PATCH] net/mlx5: fix meter policy creation assert
[ upstream commit 9267617bb0a6918ee049b1a16062bf0185e2e843 ]
The meter policy creation doesn't belong to flow rule creation
process, so thread workspace was not initialized and there will be
assert error when using it.
This patch removes the incorrect using of thread workspace in meter
policy creation, and adds a flag in policy instead. When creating
flow rule, can use the flag to set the mark flag in thread workspace.
Fixes: 082becbf1f35 ("net/mlx5: fix mark enabling for Rx")
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5.h | 2 ++
drivers/net/mlx5/mlx5_flow.c | 2 ++
drivers/net/mlx5/mlx5_flow_dv.c | 6 +++---
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 2d682e1e81..128ebd6937 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -748,4 +748,6 @@ struct mlx5_flow_meter_policy {
uint32_t skip_g:1;
/* If green color policy is skipped. */
+ uint32_t mark:1;
+ /* If policy contains mark action. */
rte_spinlock_t sl;
uint32_t ref_cnt;
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index cee8f00413..5b36cfa042 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -6070,4 +6070,6 @@ flow_create_split_meter(struct rte_eth_dev *dev,
NULL);
MLX5_ASSERT(wks->policy);
+ if (wks->policy->mark)
+ wks->mark = 1;
if (wks->policy->is_hierarchy) {
wks->final_policy =
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index a35fb3de4e..1ed0ebb3d9 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -15449,7 +15449,5 @@ __flow_dv_create_domain_policy_acts(struct rte_eth_dev *dev,
} mhdr_dummy;
struct mlx5_flow_dv_modify_hdr_resource *mhdr_res = &mhdr_dummy.res;
- struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace();
- MLX5_ASSERT(wks);
egress = (domain == MLX5_MTR_DOMAIN_EGRESS) ? 1 : 0;
transfer = (domain == MLX5_MTR_DOMAIN_TRANSFER) ? 1 : 0;
@@ -15489,5 +15487,4 @@ __flow_dv_create_domain_policy_acts(struct rte_eth_dev *dev,
"cannot create policy "
"mark action for this color");
- wks->mark = 1;
if (flow_dv_tag_resource_register(dev, tag_be,
&dev_flow, &flow_err))
@@ -15501,4 +15498,5 @@ __flow_dv_create_domain_policy_acts(struct rte_eth_dev *dev,
dev_flow.handle->dvh.rix_tag;
action_flags |= MLX5_FLOW_ACTION_MARK;
+ mtr_policy->mark = 1;
break;
}
@@ -15784,4 +15782,6 @@ __flow_dv_create_domain_policy_acts(struct rte_eth_dev *dev,
mtr_policy->is_hierarchy = 1;
mtr_policy->dev = next_policy->dev;
+ if (next_policy->mark)
+ mtr_policy->mark = 1;
action_flags |=
MLX5_FLOW_ACTION_METER_WITH_TERMINATED_POLICY;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-10 12:05:31.780278514 +0000
+++ 0018-net-mlx5-fix-meter-policy-creation-assert.patch 2022-03-10 12:05:31.305630868 +0000
@@ -1 +1 @@
-From 9267617bb0a6918ee049b1a16062bf0185e2e843 Mon Sep 17 00:00:00 2001
+From 3bd5cf393d0ab0152596bf2d0d8a8c2270a047d5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9267617bb0a6918ee049b1a16062bf0185e2e843 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index dd5cd9209f..23a28f6e52 100644
+index 2d682e1e81..128ebd6937 100644
@@ -29 +30 @@
-@@ -780,4 +780,6 @@ struct mlx5_flow_meter_policy {
+@@ -748,4 +748,6 @@ struct mlx5_flow_meter_policy {
@@ -37 +38 @@
-index efb988a9bb..15a4a8cd98 100644
+index cee8f00413..5b36cfa042 100644
@@ -40 +41 @@
-@@ -6297,4 +6297,6 @@ flow_create_split_meter(struct rte_eth_dev *dev,
+@@ -6070,4 +6070,6 @@ flow_create_split_meter(struct rte_eth_dev *dev,
@@ -48 +49 @@
-index 34d2c7a99f..29751e7eda 100644
+index a35fb3de4e..1ed0ebb3d9 100644
@@ -51 +52 @@
-@@ -15567,7 +15567,5 @@ __flow_dv_create_domain_policy_acts(struct rte_eth_dev *dev,
+@@ -15449,7 +15449,5 @@ __flow_dv_create_domain_policy_acts(struct rte_eth_dev *dev,
@@ -59 +60 @@
-@@ -15607,5 +15605,4 @@ __flow_dv_create_domain_policy_acts(struct rte_eth_dev *dev,
+@@ -15489,5 +15487,4 @@ __flow_dv_create_domain_policy_acts(struct rte_eth_dev *dev,
@@ -65 +66 @@
-@@ -15619,4 +15616,5 @@ __flow_dv_create_domain_policy_acts(struct rte_eth_dev *dev,
+@@ -15501,4 +15498,5 @@ __flow_dv_create_domain_policy_acts(struct rte_eth_dev *dev,
@@ -71 +72 @@
-@@ -15902,4 +15900,6 @@ __flow_dv_create_domain_policy_acts(struct rte_eth_dev *dev,
+@@ -15784,4 +15782,6 @@ __flow_dv_create_domain_policy_acts(struct rte_eth_dev *dev,
next prev parent reply other threads:[~2022-03-10 12:12 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 12:11 patch 'examples/kni: add missing trailing newline in log' " Kevin Traynor
2022-03-10 12:11 ` patch 'devtools: remove event/dlb exception in ABI check' " Kevin Traynor
2022-03-10 12:11 ` patch 'build: fix build on FreeBSD with Meson 0.61.1' " Kevin Traynor
2022-03-10 12:11 ` patch 'ethdev: fix doxygen comments for device info struct' " Kevin Traynor
2022-03-10 12:11 ` patch 'net/bnxt: fix null dereference in session cleanup' " Kevin Traynor
2022-03-10 12:11 ` patch 'net/mlx5: fix inet IPIP protocol type' " Kevin Traynor
2022-03-10 12:11 ` patch 'net/mlx5: fix next protocol RSS expansion' " Kevin Traynor
2022-03-10 12:11 ` patch 'net/mlx5: fix shared RSS destroy' " Kevin Traynor
2022-03-10 13:12 ` Kevin Traynor
2022-03-10 12:11 ` patch 'net/mlx5: fix modify port action validation' " Kevin Traynor
2022-03-10 12:11 ` patch 'net/mlx5: remove unused reference counter' " Kevin Traynor
2022-03-10 12:11 ` Kevin Traynor [this message]
2022-03-10 12:11 ` patch 'net/mlx5: fix flex item availability' " Kevin Traynor
2022-03-21 17:02 ` Kevin Traynor
2022-03-23 16:03 ` Kevin Traynor
2022-03-25 17:27 ` Kevin Traynor
2022-03-10 12:11 ` patch 'net/mlx5: fix MPLS/GRE Verbs spec ordering' " Kevin Traynor
2022-03-10 12:11 ` patch 'net/mlx5: fix configuration without Rx queue' " Kevin Traynor
2022-03-10 12:11 ` patch 'net/mlx5: fix meter creation default state' " Kevin Traynor
2022-03-10 12:11 ` patch 'net/sfc: reduce log level of tunnel restore info error' " Kevin Traynor
2022-03-10 12:11 ` patch 'net/iavf: fix potential out-of-bounds access' " Kevin Traynor
2022-03-10 12:11 ` patch 'regexdev: fix section attribute of symbols' " Kevin Traynor
2022-03-10 12:11 ` patch 'common/mlx5: consider local functions as internal' " Kevin Traynor
2022-03-10 12:11 ` patch 'build: hide local symbols in shared libraries' " Kevin Traynor
2022-03-10 12:11 ` patch 'devtools: fix symbols check' " Kevin Traynor
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=20220310121127.1324802-11-ktraynor@redhat.com \
--to=ktraynor@redhat.com \
--cc=matan@nvidia.com \
--cc=shunh@nvidia.com \
--cc=stable@dpdk.org \
/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).