patch 'net/mlx5: fix profile check of meter mark' has been queued to stable release 22.11.3
Xueming Li
xuemingl at nvidia.com
Thu Aug 10 01:58:59 CEST 2023
Hi,
FYI, your patch has been queued to stable release 22.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=92c7aa6a22ca77263470c4caf6e17b32a5e7187d
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 92c7aa6a22ca77263470c4caf6e17b32a5e7187d Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz at nvidia.com>
Date: Fri, 30 Jun 2023 15:44:45 +0300
Subject: [PATCH] net/mlx5: fix profile check of meter mark
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit c8957cc9d9750756eaa21e575781bf3b7d7277e6 ]
When creating a meter_mark action, the profile should be specified.
Or else there would be a crash if the pointer to the profile was not
set properly:
1. creating an action template with only action mask set and using
this template to create a table
2. creating a flow rule without setting the profile if the action
of meter_mark is not fixed
The check should be done inside the action allocation and an error
needs to be returned immediately.
Fixes: 48fbb0e93d06 ("net/mlx5: support flow meter mark indirect action with HWS")
Signed-off-by: Bing Zhao <bingz at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
drivers/net/mlx5/mlx5_flow_hw.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index a3fd87b16f..102f67a925 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -1243,6 +1243,8 @@ flow_hw_meter_mark_alloc(struct rte_eth_dev *dev, uint32_t queue,
struct mlx5_flow_meter_info *fm;
uint32_t mtr_id;
+ if (meter_mark->profile == NULL)
+ return NULL;
aso_mtr = mlx5_ipool_malloc(priv->hws_mpool->idx_pool, &mtr_id);
if (!aso_mtr)
return NULL;
--
2.25.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-08-09 21:51:20.236679500 +0800
+++ 0080-net-mlx5-fix-profile-check-of-meter-mark.patch 2023-08-09 21:51:18.244352000 +0800
@@ -1 +1 @@
-From c8957cc9d9750756eaa21e575781bf3b7d7277e6 Mon Sep 17 00:00:00 2001
+From 92c7aa6a22ca77263470c4caf6e17b32a5e7187d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit c8957cc9d9750756eaa21e575781bf3b7d7277e6 ]
@@ -18 +20,0 @@
-Cc: stable at dpdk.org
@@ -27 +29 @@
-index cbdac2996c..330386df77 100644
+index a3fd87b16f..102f67a925 100644
@@ -30 +32 @@
-@@ -1325,6 +1325,8 @@ flow_hw_meter_mark_alloc(struct rte_eth_dev *dev, uint32_t queue,
+@@ -1243,6 +1243,8 @@ flow_hw_meter_mark_alloc(struct rte_eth_dev *dev, uint32_t queue,
More information about the stable
mailing list