patch 'net/mlx5: fix age position in hairpin split' has been queued to stable release 21.11.7

Kevin Traynor ktraynor at redhat.com
Thu Apr 4 11:51:40 CEST 2024


Hi,

FYI, your patch has been queued to stable release 21.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/09/24. 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/165b252b21bdc04bbaac67f4ad76e36f9e16cfce

Thanks.

Kevin

---
>From 165b252b21bdc04bbaac67f4ad76e36f9e16cfce Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz at nvidia.com>
Date: Thu, 7 Mar 2024 10:09:24 +0200
Subject: [PATCH] net/mlx5: fix age position in hairpin split

[ upstream commit 4c89815eab7471b98388dc958b95777d341f05fc ]

When splitting a hairpin rule implicitly, the count action will
be on either Tx or Rx subflow based on the encapsulation checking.

Once there is a flow rule with both count and age action, one counter
will be reused. If there is only age action and the ASO flow hit is
supported, the flow hit will be chosen instead of a counter.

In the previous flow splitting, the age would always be in the Rx
part, while the count would be on the Tx part when there is an encap.

Before this commit, 2 issues can be observed with a hairpin split:
  1. On the root table, one counter was used on both Rx and Tx parts
     for age and count actions. Then one ingress packet will be
     counted twice.
  2. On the non-root table, an extra ASO flow hit was used on the Rx
     part. This would cause some overhead.

The age and count actions should be in the same subflow instead of 2.

Fixes: daed4b6e3db2 ("net/mlx5: use aging by counter when counter exists")

Signed-off-by: Bing Zhao <bingz at nvidia.com>
Acked-by: Ori Kam <orika at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c    | 1 +
 drivers/net/mlx5/mlx5_flow_dv.c | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 6399d93b93..533cc13f2a 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -4760,4 +4760,5 @@ flow_hairpin_split(struct rte_eth_dev *dev,
 			break;
 		case RTE_FLOW_ACTION_TYPE_COUNT:
+		case RTE_FLOW_ACTION_TYPE_AGE:
 			if (encap) {
 				rte_memcpy(actions_tx, actions,
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index e3132995a3..1bf9517638 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -17682,6 +17682,5 @@ flow_dv_get_aged_flows(struct rte_eth_dev *dev,
 		nb_flows++;
 		if (nb_contexts) {
-			context[nb_flows - 1] =
-						act->age_params.context;
+			context[nb_flows - 1] = act->age_params.context;
 			if (!(--nb_contexts))
 				break;
-- 
2.44.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-04-04 10:49:34.249701898 +0100
+++ 0010-net-mlx5-fix-age-position-in-hairpin-split.patch	2024-04-04 10:49:33.737457703 +0100
@@ -1 +1 @@
-From 4c89815eab7471b98388dc958b95777d341f05fc Mon Sep 17 00:00:00 2001
+From 165b252b21bdc04bbaac67f4ad76e36f9e16cfce Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4c89815eab7471b98388dc958b95777d341f05fc ]
+
@@ -26 +27,0 @@
-Cc: stable at dpdk.org
@@ -36 +37 @@
-index 6484874c35..f31fdfbf3d 100644
+index 6399d93b93..533cc13f2a 100644
@@ -39 +40 @@
-@@ -5400,4 +5400,5 @@ flow_hairpin_split(struct rte_eth_dev *dev,
+@@ -4760,4 +4760,5 @@ flow_hairpin_split(struct rte_eth_dev *dev,
@@ -46 +47 @@
-index 80239bebee..4badde1a9a 100644
+index e3132995a3..1bf9517638 100644
@@ -49 +50 @@
-@@ -19362,6 +19362,5 @@ flow_dv_get_aged_flows(struct rte_eth_dev *dev,
+@@ -17682,6 +17682,5 @@ flow_dv_get_aged_flows(struct rte_eth_dev *dev,



More information about the stable mailing list