patch 'net/mlx5/hws: fix VLAN item in non-relaxed mode' has been queued to stable release 22.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Mar 14 01:09:35 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/16/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/c3d7ceece3712d9e30d7f6d24eb8b228a338ca5d

Thanks.

Luca Boccassi

---
>From c3d7ceece3712d9e30d7f6d24eb8b228a338ca5d Mon Sep 17 00:00:00 2001
From: Hamdan Igbaria <hamdani at nvidia.com>
Date: Sun, 18 Feb 2024 07:11:20 +0200
Subject: [PATCH] net/mlx5/hws: fix VLAN item in non-relaxed mode

[ upstream commit 0aacd886e93df862f010a45ed333d08355f4bca8 ]

If a VLAN item was passed with null mask, the item handler would
return immediately and thus won't set default values for non relax
mode.
Also change the non relax default set to single-tagged (CVLAN).

Fixes: c55c2bf35333 ("net/mlx5/hws: add definer layer")

Signed-off-by: Hamdan Igbaria <hamdani at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_definer.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c
index 9637281a1e..52f615d842 100644
--- a/drivers/net/mlx5/hws/mlx5dr_definer.c
+++ b/drivers/net/mlx5/hws/mlx5dr_definer.c
@@ -163,7 +163,8 @@ struct mlx5dr_definer_conv_data {
 	X(SET_BE32,	gre_opt_key,		v->key.key,		rte_flow_item_gre_opt) \
 	X(SET_BE32,	gre_opt_seq,		v->sequence.sequence,	rte_flow_item_gre_opt) \
 	X(SET_BE16,	gre_opt_checksum,	v->checksum_rsvd.checksum,	rte_flow_item_gre_opt) \
-	X(SET,		meter_color,		rte_col_2_mlx5_col(v->color),	rte_flow_item_meter_color)
+	X(SET,		meter_color,		rte_col_2_mlx5_col(v->color),	rte_flow_item_meter_color) \
+	X(SET,		cvlan,			STE_CVLAN,		rte_flow_item_vlan)
 
 /* Item set function format */
 #define X(set_type, func_name, value, item_type) \
@@ -477,6 +478,15 @@ mlx5dr_definer_conv_item_vlan(struct mlx5dr_definer_conv_data *cd,
 	struct mlx5dr_definer_fc *fc;
 	bool inner = cd->tunnel;
 
+	if (!cd->relaxed) {
+		/* Mark packet as tagged (CVLAN) */
+		fc = &cd->fc[DR_CALC_FNAME(VLAN_TYPE, inner)];
+		fc->item_idx = item_idx;
+		fc->tag_mask_set = &mlx5dr_definer_ones_set;
+		fc->tag_set = &mlx5dr_definer_cvlan_set;
+		DR_CALC_SET(fc, eth_l2, first_vlan_qualifier, inner);
+	}
+
 	if (!m)
 		return 0;
 
@@ -485,8 +495,7 @@ mlx5dr_definer_conv_item_vlan(struct mlx5dr_definer_conv_data *cd,
 		return rte_errno;
 	}
 
-	if (!cd->relaxed || m->has_more_vlan) {
-		/* Mark packet as tagged (CVLAN or SVLAN) even if TCI is not specified.*/
+	if (m->has_more_vlan) {
 		fc = &cd->fc[DR_CALC_FNAME(VLAN_TYPE, inner)];
 		fc->item_idx = item_idx;
 		fc->tag_mask_set = &mlx5dr_definer_ones_set;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.483803527 +0000
+++ 0039-net-mlx5-hws-fix-VLAN-item-in-non-relaxed-mode.patch	2024-03-14 00:09:20.629615539 +0000
@@ -1 +1 @@
-From 0aacd886e93df862f010a45ed333d08355f4bca8 Mon Sep 17 00:00:00 2001
+From c3d7ceece3712d9e30d7f6d24eb8b228a338ca5d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0aacd886e93df862f010a45ed333d08355f4bca8 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -17,2 +18,2 @@
- drivers/net/mlx5/hws/mlx5dr_definer.c | 13 +++++++++++--
- 1 file changed, 11 insertions(+), 2 deletions(-)
+ drivers/net/mlx5/hws/mlx5dr_definer.c | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
@@ -21 +22 @@
-index eb788a772a..b8a546989a 100644
+index 9637281a1e..52f615d842 100644
@@ -24,5 +25,7 @@
-@@ -223,6 +223,7 @@ struct mlx5dr_definer_conv_data {
- 	X(SET,		ib_l4_opcode,		v->hdr.opcode,		rte_flow_item_ib_bth) \
- 	X(SET,		random_number,		v->value,		rte_flow_item_random) \
- 	X(SET,		ib_l4_bth_a,		v->hdr.a,		rte_flow_item_ib_bth) \
-+	X(SET,		cvlan,			STE_CVLAN,		rte_flow_item_vlan) \
+@@ -163,7 +163,8 @@ struct mlx5dr_definer_conv_data {
+ 	X(SET_BE32,	gre_opt_key,		v->key.key,		rte_flow_item_gre_opt) \
+ 	X(SET_BE32,	gre_opt_seq,		v->sequence.sequence,	rte_flow_item_gre_opt) \
+ 	X(SET_BE16,	gre_opt_checksum,	v->checksum_rsvd.checksum,	rte_flow_item_gre_opt) \
+-	X(SET,		meter_color,		rte_col_2_mlx5_col(v->color),	rte_flow_item_meter_color)
++	X(SET,		meter_color,		rte_col_2_mlx5_col(v->color),	rte_flow_item_meter_color) \
++	X(SET,		cvlan,			STE_CVLAN,		rte_flow_item_vlan)
@@ -32 +35 @@
-@@ -864,6 +865,15 @@ mlx5dr_definer_conv_item_vlan(struct mlx5dr_definer_conv_data *cd,
+@@ -477,6 +478,15 @@ mlx5dr_definer_conv_item_vlan(struct mlx5dr_definer_conv_data *cd,
@@ -48 +51 @@
-@@ -872,8 +882,7 @@ mlx5dr_definer_conv_item_vlan(struct mlx5dr_definer_conv_data *cd,
+@@ -485,8 +495,7 @@ mlx5dr_definer_conv_item_vlan(struct mlx5dr_definer_conv_data *cd,


More information about the stable mailing list