[dpdk-stable] patch 'net/mlx5: fix CVLAN tag set in IP item translation' has been queued to LTS release 18.11.9
Kevin Traynor
ktraynor at redhat.com
Thu May 28 18:22:07 CEST 2020
Hi,
FYI, your patch has been queued to LTS release 18.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/03/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.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/87bfc24e13a80da6b40cd44c2d080f534f53a0dd
Thanks.
Kevin.
---
>From 87bfc24e13a80da6b40cd44c2d080f534f53a0dd Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp at mellanox.com>
Date: Mon, 16 Mar 2020 10:57:39 +0200
Subject: [PATCH] net/mlx5: fix CVLAN tag set in IP item translation
[ upstream commit 1908cab425e4206321fb3f62688f9e1f92b36f6a ]
Previous fix added, at the end of functions
flow_dv_translate_item_ipv4() and flow_dv_translate_item_ipv6(), the
setting of cvlan_tag mask.
In the case of unspecified item (item->spec == null) these functions
return, and the new code section is not reached.
This patch moves the setting of cvlan_tag mask to be done before the
check of item->spec, to make sure it is always executed.
Fixes: 797329d6c4a1 ("net/mlx5: fix match on ethertype and CVLAN tag")
Signed-off-by: Dekel Peled <dekelp at mellanox.com>
Acked-by: Matan Azrad <matan at mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 54b8770ffc..2586728afa 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1308,4 +1308,11 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0xf);
MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_version, 4);
+ /*
+ * On outer header (which must contains L2), or inner header with L2,
+ * set cvlan_tag mask bit to mark this packet as untagged.
+ * This should be done even if item->spec is empty.
+ */
+ if (!inner || item_flags & MLX5_FLOW_LAYER_INNER_L2)
+ MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
if (!ipv4_v)
return;
@@ -1335,10 +1342,4 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
ipv4_v->hdr.next_proto_id & ipv4_m->hdr.next_proto_id);
- /*
- * On outer header (which must contains L2), or inner header with L2,
- * set cvlan_tag mask bit to mark this packet as untagged.
- */
- if (!inner || item_flags & MLX5_FLOW_LAYER_INNER_L2)
- MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
}
@@ -1400,4 +1401,11 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0xf);
MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_version, 6);
+ /*
+ * On outer header (which must contains L2), or inner header with L2,
+ * set cvlan_tag mask bit to mark this packet as untagged.
+ * This should be done even if item->spec is empty.
+ */
+ if (!inner || item_flags & MLX5_FLOW_LAYER_INNER_L2)
+ MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
if (!ipv6_v)
return;
@@ -1443,10 +1451,4 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
ipv6_v->hdr.proto & ipv6_m->hdr.proto);
- /*
- * On outer header (which must contains L2), or inner header with L2,
- * set cvlan_tag mask bit to mark this packet as untagged.
- */
- if (!inner || item_flags & MLX5_FLOW_LAYER_INNER_L2)
- MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
}
--
2.21.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-05-28 17:13:00.214273729 +0100
+++ 0020-net-mlx5-fix-CVLAN-tag-set-in-IP-item-translation.patch 2020-05-28 17:12:59.080556875 +0100
@@ -1 +1 @@
-From 1908cab425e4206321fb3f62688f9e1f92b36f6a Mon Sep 17 00:00:00 2001
+From 87bfc24e13a80da6b40cd44c2d080f534f53a0dd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1908cab425e4206321fb3f62688f9e1f92b36f6a ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index e2d6690fa8..20906318ee 100644
+index 54b8770ffc..2586728afa 100644
@@ -28,2 +29,2 @@
-@@ -5465,4 +5465,11 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
- MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0x4);
+@@ -1308,4 +1308,11 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
+ MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0xf);
@@ -40,3 +41,3 @@
-@@ -5496,10 +5503,4 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
- MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_ttl_hoplimit,
- ipv4_v->hdr.time_to_live & ipv4_m->hdr.time_to_live);
+@@ -1335,10 +1342,4 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
+ MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
+ ipv4_v->hdr.next_proto_id & ipv4_m->hdr.next_proto_id);
@@ -51,2 +52,2 @@
-@@ -5566,4 +5567,11 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
- MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0x6);
+@@ -1400,4 +1401,11 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
+ MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0xf);
@@ -63,3 +64,3 @@
-@@ -5614,10 +5622,4 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
- MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_ttl_hoplimit,
- ipv6_v->hdr.hop_limits & ipv6_m->hdr.hop_limits);
+@@ -1443,10 +1451,4 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
+ MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
+ ipv6_v->hdr.proto & ipv6_m->hdr.proto);
More information about the stable
mailing list