[dpdk-stable] patch 'net/mlx5: fix VLAN PCP item calculation' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 14:53:30 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 64a38788d1c3c7c7e30ef2b4cce7c32ed8d4af6f Mon Sep 17 00:00:00 2001
From: Ophir Munk <ophirmu at mellanox.com>
Date: Wed, 26 Feb 2020 08:27:48 +0000
Subject: [PATCH] net/mlx5: fix VLAN PCP item calculation

[ upstream commit 3c3f27e905792670933fabe577f9653336780688 ]

The VLAN 16 bits tci field contains both values of PCP and VID. When
extracting any one of them - it is required not to affect the other one.
Previous to this commit in routine flow_dev_get_vlan_info_from_items()
we calculated the PCP as follows:
    (1) vlan->vlan_tci &= MLX5DV_FLOW_VLAN_PCP_MASK;
    (2) vlan->vlan_tci |= <3 bits value of PCP>
In line (1) we should have used the negated mask ('~' operator) such
that only the PCP bits will be nullified before ORing them with the
updated PCP value.

Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")

Signed-off-by: Ophir Munk <ophirmu at mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 3694d6dd94..69b17f104e 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1640,7 +1640,7 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
 		/* Only full match values are accepted */
 		if ((vlan_m->tci & MLX5DV_FLOW_VLAN_PCP_MASK_BE) ==
 		     MLX5DV_FLOW_VLAN_PCP_MASK_BE) {
-			vlan->vlan_tci &= MLX5DV_FLOW_VLAN_PCP_MASK;
+			vlan->vlan_tci &= ~MLX5DV_FLOW_VLAN_PCP_MASK;
 			vlan->vlan_tci |=
 				rte_be_to_cpu_16(vlan_v->tci &
 						 MLX5DV_FLOW_VLAN_PCP_MASK_BE);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.602724239 +0100
+++ 0020-net-mlx5-fix-VLAN-PCP-item-calculation.patch	2020-05-19 13:56:18.191501315 +0100
@@ -1,8 +1,10 @@
-From 3c3f27e905792670933fabe577f9653336780688 Mon Sep 17 00:00:00 2001
+From 64a38788d1c3c7c7e30ef2b4cce7c32ed8d4af6f Mon Sep 17 00:00:00 2001
 From: Ophir Munk <ophirmu at mellanox.com>
 Date: Wed, 26 Feb 2020 08:27:48 +0000
 Subject: [PATCH] net/mlx5: fix VLAN PCP item calculation
 
+[ upstream commit 3c3f27e905792670933fabe577f9653336780688 ]
+
 The VLAN 16 bits tci field contains both values of PCP and VID. When
 extracting any one of them - it is required not to affect the other one.
 Previous to this commit in routine flow_dev_get_vlan_info_from_items()
@@ -14,7 +16,6 @@
 updated PCP value.
 
 Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
-Cc: stable at dpdk.org
 
 Signed-off-by: Ophir Munk <ophirmu at mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
@@ -23,10 +24,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 06592b5340..2414a97716 100644
+index 3694d6dd94..69b17f104e 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1771,7 +1771,7 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
+@@ -1640,7 +1640,7 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
  		/* Only full match values are accepted */
  		if ((vlan_m->tci & MLX5DV_FLOW_VLAN_PCP_MASK_BE) ==
  		     MLX5DV_FLOW_VLAN_PCP_MASK_BE) {


More information about the stable mailing list