summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2016-08-03 22:45:48 -0400
committerDave Barach <openvpp@barachs.net>2016-08-04 12:13:05 +0000
commitc08f5a7aefc90d344e1ebee4bcce3f53f2d26c3d (patch)
treedc997b732203de6bef4d2a0605b6912e0595b204
parentbb5c22f1b6f48cb53fa2d0e5abcac7248318f8e0 (diff)
ENIC driver patch for PKT_RX_VLAN_PKT packet flag backward compatibility
The PKT_RX_VLAN_PKT flag will be totally obsolete by 16.11. We still need this ENIC driver patch for 16.07. Change-Id: I287035525d2d1b5313e88e9e74b6310536de2c32 Signed-off-by: John Lo <loj@cisco.com>
-rw-r--r--dpdk/dpdk-16.07_patches/0003-enic-Set-PKT_RX_VLAN_PKT-iff-returned-packet-has-VLA.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/dpdk/dpdk-16.07_patches/0003-enic-Set-PKT_RX_VLAN_PKT-iff-returned-packet-has-VLA.patch b/dpdk/dpdk-16.07_patches/0003-enic-Set-PKT_RX_VLAN_PKT-iff-returned-packet-has-VLA.patch
new file mode 100644
index 00000000..53264158
--- /dev/null
+++ b/dpdk/dpdk-16.07_patches/0003-enic-Set-PKT_RX_VLAN_PKT-iff-returned-packet-has-VLA.patch
@@ -0,0 +1,42 @@
+From 6a7a9e52ed2ccfa86c2def3a66a368a5577f2fc2 Mon Sep 17 00:00:00 2001
+From: John Daley <johndale@cisco.com>
+Date: Tue, 3 May 2016 13:56:05 -0700
+Subject: [PATCH] enic: Set PKT_RX_VLAN_PKT iff returned packet has VLAN tag
+
+Only set the ol_flags PKT_RX_VLAN_PKT bit if the packet being passed
+to the application contains a VLAN tag. This is true whether
+stripping is enabled or disabled.
+
+This area of the API is in flux, so behaviour may change in the
+future.
+
+Signed-off-by: John Daley <johndale@cisco.com>
+---
+ drivers/net/enic/enic_rxtx.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c
+index 02b54dd..6a95389 100644
+--- a/drivers/net/enic/enic_rxtx.c
++++ b/drivers/net/enic/enic_rxtx.c
+@@ -195,12 +195,16 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf)
+ if (unlikely(!enic_cq_rx_desc_eop(ciflags)))
+ goto mbuf_flags_done;
+
+- /* VLAN stripping */
++ /* VLAN stripping. Set PKT_RX_VLAN_PKT only if there is a vlan tag
++ * in the packet passed up
++ */
+ if (bwflags & CQ_ENET_RQ_DESC_FLAGS_VLAN_STRIPPED) {
+- pkt_flags |= PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED;
++ pkt_flags |= PKT_RX_VLAN_STRIPPED;
+ mbuf->vlan_tci = enic_cq_rx_desc_vlan(cqrd);
+ } else {
+ mbuf->vlan_tci = 0;
++ if (enic_cq_rx_desc_vlan(cqrd))
++ pkt_flags |= PKT_RX_VLAN_PKT;
+ }
+
+ /* RSS flag */
+--
+