[dpdk-stable] patch 'net/mlx5: fix flow split combined with age action' has been queued to stable release 20.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 5 12:18:32 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.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 02/07/21. 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d4336647554aa4cd22583d40219afdd9d8be10e2

Thanks.

Luca Boccassi

---
>From d4336647554aa4cd22583d40219afdd9d8be10e2 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp at nvidia.com>
Date: Sun, 17 Jan 2021 11:40:45 +0200
Subject: [PATCH] net/mlx5: fix flow split combined with age action

[ upstream commit 14ccfd2ed1686fa6bb42117b0461be278816eca6 ]

Currently, for a flow containing an age action, if flow is split to
sub-flows, a new age action will be created for each sub-flow.
However only the action created for the last sub-flow will be queried
on flow query and cleared on flow removal.

This behavior is wrong, causing a leak of resources.
Need to create just one action per flow, and use it for all sub-flows.

This patch adds the required check to make sure an age action is
created just once per flow, and used by all sub-flows.

Fixes: f935ed4b645a ("net/mlx5: support flow hit action for aging")

Signed-off-by: Dekel Peled <dekelp at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index ab9aaab4ec..ae836c6a52 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -9897,14 +9897,22 @@ flow_dv_translate(struct rte_eth_dev *dev,
 			break;
 		case RTE_FLOW_ACTION_TYPE_AGE:
 			if (priv->sh->flow_hit_aso_en && attr->group) {
-				flow->age = flow_dv_translate_create_aso_age
-						(dev, action->conf, error);
-				if (!flow->age)
-					return rte_flow_error_set
+				/*
+				 * Create one shared age action, to be used
+				 * by all sub-flows.
+				 */
+				if (!flow->age) {
+					flow->age =
+						flow_dv_translate_create_aso_age
+							(dev, action->conf,
+							 error);
+					if (!flow->age)
+						return rte_flow_error_set
 						(error, rte_errno,
 						 RTE_FLOW_ERROR_TYPE_ACTION,
 						 NULL,
 						 "can't create ASO age action");
+				}
 				dev_flow->dv.actions[actions_n++] =
 					  (flow_aso_age_get_by_idx
 						(dev, flow->age))->dr_action;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.137016022 +0000
+++ 0226-net-mlx5-fix-flow-split-combined-with-age-action.patch	2021-02-05 11:18:29.198698575 +0000
@@ -1 +1 @@
-From 14ccfd2ed1686fa6bb42117b0461be278816eca6 Mon Sep 17 00:00:00 2001
+From d4336647554aa4cd22583d40219afdd9d8be10e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 14ccfd2ed1686fa6bb42117b0461be278816eca6 ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -27 +28 @@
-index 012d5893ba..f32d6c12df 100644
+index ab9aaab4ec..ae836c6a52 100644
@@ -30 +31 @@
-@@ -10344,14 +10344,22 @@ flow_dv_translate(struct rte_eth_dev *dev,
+@@ -9897,14 +9897,22 @@ flow_dv_translate(struct rte_eth_dev *dev,


More information about the stable mailing list