patch 'net/mlx5: fix age position in hairpin split' has been queued to stable release 22.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Mar 18 16:39:14 CET 2024
Hi,
FYI, your patch has been queued to stable release 22.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0ddc41f5c64f3f473f562d8bea8a5b8a68b05a32
Thanks.
Luca Boccassi
---
>From 0ddc41f5c64f3f473f562d8bea8a5b8a68b05a32 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 89c98f95f9..1e8d9ac978 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -5135,6 +5135,7 @@ 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,
sizeof(struct rte_flow_action));
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 68d3ee0c36..85dcc399c2 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -18585,8 +18585,7 @@ flow_dv_get_aged_flows(struct rte_eth_dev *dev,
LIST_FOREACH(act, &age_info->aged_aso, next) {
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.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-18 12:58:40.319119761 +0000
+++ 0024-net-mlx5-fix-age-position-in-hairpin-split.patch 2024-03-18 12:58:39.251348516 +0000
@@ -1 +1 @@
-From 4c89815eab7471b98388dc958b95777d341f05fc Mon Sep 17 00:00:00 2001
+From 0ddc41f5c64f3f473f562d8bea8a5b8a68b05a32 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 89c98f95f9..1e8d9ac978 100644
@@ -39 +40 @@
-@@ -5399,6 +5399,7 @@ flow_hairpin_split(struct rte_eth_dev *dev,
+@@ -5135,6 +5135,7 @@ flow_hairpin_split(struct rte_eth_dev *dev,
@@ -48 +49 @@
-index 80239bebee..4badde1a9a 100644
+index 68d3ee0c36..85dcc399c2 100644
@@ -51 +52 @@
-@@ -19361,8 +19361,7 @@ flow_dv_get_aged_flows(struct rte_eth_dev *dev,
+@@ -18585,8 +18585,7 @@ flow_dv_get_aged_flows(struct rte_eth_dev *dev,
More information about the stable
mailing list