[dpdk-stable] patch 'net/mlx5: fix push VLAN action to use item info' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 15:03:46 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.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 05/21/20. 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.

Thanks.

Luca Boccassi

---
>From d2f4d1ae3d66e9f54788f21552d5c30e18828b79 Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin at mellanox.com>
Date: Mon, 13 Apr 2020 06:29:03 +0300
Subject: [PATCH] net/mlx5: fix push VLAN action to use item info

[ upstream commit 7162c02d7bf700312f644ca3e598ab6e034e180c ]

Currently when PMD create push VLAN action it need to provide VID to HW
and PMD get VID value from item VLAN in pattern if there is no
of_set_vlan_vid action following.

When user create rule like [1], which has of_set_vlan_vid action
before of_push_vlan, the intention is to modify VID on existing VLAN
header and push a new VLAN header with VID _inherit_ from the previous
of_set_vlan_vid.

Currently the above is not covered by PMD, PMD always fetch the VLAN
information from item for of_push_vlan action.

Fix it by only fetch VLAN information from item when there is no
previous of_set_vlan_vid action.

[1]: testpmd> flow create 2 ingress transfer group 1 priority 3 pattern
                eth / vlan vid is 2731 / ipv4 / end actions
		of_set_vlan_vid vlan_vid 3209 / of_push_vlan ethertype
		0x88A8 / port_id id 1 / end

Fixes: b8c0372bc5ac ("net/mlx5: fix set VLAN ID/PCP in new header")

Signed-off-by: Xiaoyu Min <jackmin at mellanox.com>
Reviewed-by: Dekel Peled <dekelp at mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 0f438bfc3b..8c3748f13c 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7119,7 +7119,9 @@ cnt_err:
 			action_flags |= MLX5_FLOW_ACTION_OF_POP_VLAN;
 			break;
 		case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:
-			flow_dev_get_vlan_info_from_items(items, &vlan);
+			if (!(action_flags &
+			      MLX5_FLOW_ACTION_OF_SET_VLAN_VID))
+				flow_dev_get_vlan_info_from_items(items, &vlan);
 			vlan.eth_proto = rte_be_to_cpu_16
 			     ((((const struct rte_flow_action_of_push_vlan *)
 						   actions->conf)->ethertype));
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.177747609 +0100
+++ 0091-net-mlx5-fix-push-VLAN-action-to-use-item-info.patch	2020-05-19 14:04:44.296649823 +0100
@@ -1,8 +1,10 @@
-From 7162c02d7bf700312f644ca3e598ab6e034e180c Mon Sep 17 00:00:00 2001
+From d2f4d1ae3d66e9f54788f21552d5c30e18828b79 Mon Sep 17 00:00:00 2001
 From: Xiaoyu Min <jackmin at mellanox.com>
 Date: Mon, 13 Apr 2020 06:29:03 +0300
 Subject: [PATCH] net/mlx5: fix push VLAN action to use item info
 
+[ upstream commit 7162c02d7bf700312f644ca3e598ab6e034e180c ]
+
 Currently when PMD create push VLAN action it need to provide VID to HW
 and PMD get VID value from item VLAN in pattern if there is no
 of_set_vlan_vid action following.
@@ -24,7 +26,6 @@
 		0x88A8 / port_id id 1 / end
 
 Fixes: b8c0372bc5ac ("net/mlx5: fix set VLAN ID/PCP in new header")
-Cc: stable at dpdk.org
 
 Signed-off-by: Xiaoyu Min <jackmin at mellanox.com>
 Reviewed-by: Dekel Peled <dekelp at mellanox.com>
@@ -34,10 +35,10 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index e87e30f65f..5f093bedd3 100644
+index 0f438bfc3b..8c3748f13c 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -7517,7 +7517,9 @@ cnt_err:
+@@ -7119,7 +7119,9 @@ cnt_err:
  			action_flags |= MLX5_FLOW_ACTION_OF_POP_VLAN;
  			break;
  		case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:


More information about the stable mailing list