[dpdk-stable] patch 'net/enic: fix endianness in VLAN match' has been queued to LTS release 18.11.2

Kevin Traynor ktraynor at redhat.com
Wed Apr 10 18:44:07 CEST 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/16/19. 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.

Kevin Traynor

---
>From 09b076a2010d458f8b4f020d3054acab6f5ee7dc Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim at cisco.com>
Date: Sat, 2 Mar 2019 02:42:50 -0800
Subject: [PATCH] net/enic: fix endianness in VLAN match

[ upstream commit 593f17668f5ba3445bdedaa0edc5d308ca43e061 ]

The VLAN fields in the NIC filter use little endian. The VLAN item is
in big endian, so swap bytes.

Fixes: 6ced137607d0 ("net/enic: flow API for NICs with advanced filters enabled")

Signed-off-by: Hyong Youb Kim <hyonkim at cisco.com>
---
 doc/guides/nics/enic.rst     | 10 ++++++++--
 drivers/net/enic/enic_flow.c | 12 ++++++++----
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/doc/guides/nics/enic.rst b/doc/guides/nics/enic.rst
index e456e6c2d..3b45b3b3f 100644
--- a/doc/guides/nics/enic.rst
+++ b/doc/guides/nics/enic.rst
@@ -248,5 +248,5 @@ Generic Flow API is supported. The baseline support is:
 
   - Attributes: ingress
-  - Items: eth, ipv4, ipv6, udp, tcp, vxlan, inner eth, ipv4, ipv6, udp, tcp
+  - Items: eth, vlan, ipv4, ipv6, udp, tcp, vxlan, inner eth, vlan, ipv4, ipv6, udp, tcp
   - Actions: queue and void
   - Selectors: 'is', 'spec' and 'mask'. 'last' is not supported
@@ -256,5 +256,5 @@ Generic Flow API is supported. The baseline support is:
 
   - Attributes: ingress
-  - Items: eth, ipv4, ipv6, udp, tcp, vxlan, inner eth, ipv4, ipv6, udp, tcp
+  - Items: eth, vlan, ipv4, ipv6, udp, tcp, vxlan, inner eth, vlan, ipv4, ipv6, udp, tcp
   - Actions: queue, mark, drop, flag and void
   - Selectors: 'is', 'spec' and 'mask'. 'last' is not supported
@@ -267,4 +267,10 @@ Generic Flow API is supported. The baseline support is:
   - Action: count
 
+The VIC performs packet matching after applying VLAN strip. If VLAN
+stripping is enabled, EtherType in the ETH item corresponds to the
+stripped VLAN header's EtherType. Stripping does not affect the VLAN
+item. TCI and EtherType in the VLAN item are matched against those in
+the (stripped) VLAN header whether stripping is enabled or disabled.
+
 More features may be added in future firmware and new versions of the VIC.
 Please refer to the release notes.
diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c
index 4d4d4b315..30ea42e15 100644
--- a/drivers/net/enic/enic_flow.c
+++ b/drivers/net/enic/enic_flow.c
@@ -587,10 +587,14 @@ enic_copy_item_vlan_v2(const struct rte_flow_item *item,
 		if (eth_mask->ether_type)
 			return ENOTSUP;
+		/*
+		 * When packet matching, the VIC always compares vlan-stripped
+		 * L2, regardless of vlan stripping settings. So, the inner type
+		 * from vlan becomes the ether type of the eth header.
+		 */
 		eth_mask->ether_type = mask->inner_type;
 		eth_val->ether_type = spec->inner_type;
-
-		/* Outer header. Use the vlan mask/val fields */
-		gp->mask_vlan = mask->tci;
-		gp->val_vlan = spec->tci;
+		/* For TCI, use the vlan mask/val fields (little endian). */
+		gp->mask_vlan = rte_be_to_cpu_16(mask->tci);
+		gp->val_vlan = rte_be_to_cpu_16(spec->tci);
 	} else {
 		/* Inner header. Mask/Val start at *inner_ofst into L5 */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-10 14:06:12.400071277 +0100
+++ 0059-net-enic-fix-endianness-in-VLAN-match.patch	2019-04-10 14:06:08.020290672 +0100
@@ -1,13 +1,14 @@
-From 593f17668f5ba3445bdedaa0edc5d308ca43e061 Mon Sep 17 00:00:00 2001
+From 09b076a2010d458f8b4f020d3054acab6f5ee7dc Mon Sep 17 00:00:00 2001
 From: Hyong Youb Kim <hyonkim at cisco.com>
 Date: Sat, 2 Mar 2019 02:42:50 -0800
 Subject: [PATCH] net/enic: fix endianness in VLAN match
 
+[ upstream commit 593f17668f5ba3445bdedaa0edc5d308ca43e061 ]
+
 The VLAN fields in the NIC filter use little endian. The VLAN item is
 in big endian, so swap bytes.
 
 Fixes: 6ced137607d0 ("net/enic: flow API for NICs with advanced filters enabled")
-Cc: stable at dpdk.org
 
 Signed-off-by: Hyong Youb Kim <hyonkim at cisco.com>
 ---
@@ -16,7 +17,7 @@
  2 files changed, 16 insertions(+), 6 deletions(-)
 
 diff --git a/doc/guides/nics/enic.rst b/doc/guides/nics/enic.rst
-index c1415dc0d..d4241ef45 100644
+index e456e6c2d..3b45b3b3f 100644
 --- a/doc/guides/nics/enic.rst
 +++ b/doc/guides/nics/enic.rst
 @@ -248,5 +248,5 @@ Generic Flow API is supported. The baseline support is:
@@ -29,9 +30,9 @@
 @@ -256,5 +256,5 @@ Generic Flow API is supported. The baseline support is:
  
    - Attributes: ingress
--  - Items: eth, ipv4, ipv6, udp, tcp, vxlan, raw, inner eth, ipv4, ipv6, udp, tcp
-+  - Items: eth, vlan, ipv4, ipv6, udp, tcp, vxlan, raw, inner eth, vlan, ipv4, ipv6, udp, tcp
-   - Actions: queue, mark, drop, flag, rss, passthru, and void
+-  - Items: eth, ipv4, ipv6, udp, tcp, vxlan, inner eth, ipv4, ipv6, udp, tcp
++  - Items: eth, vlan, ipv4, ipv6, udp, tcp, vxlan, inner eth, vlan, ipv4, ipv6, udp, tcp
+   - Actions: queue, mark, drop, flag and void
    - Selectors: 'is', 'spec' and 'mask'. 'last' is not supported
 @@ -267,4 +267,10 @@ Generic Flow API is supported. The baseline support is:
    - Action: count
@@ -45,10 +46,10 @@
  More features may be added in future firmware and new versions of the VIC.
  Please refer to the release notes.
 diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c
-index da43b31dc..b3172e7be 100644
+index 4d4d4b315..30ea42e15 100644
 --- a/drivers/net/enic/enic_flow.c
 +++ b/drivers/net/enic/enic_flow.c
-@@ -580,10 +580,14 @@ enic_copy_item_vlan_v2(struct copy_item_args *arg)
+@@ -587,10 +587,14 @@ enic_copy_item_vlan_v2(const struct rte_flow_item *item,
  		if (eth_mask->ether_type)
  			return ENOTSUP;
 +		/*


More information about the stable mailing list