1 From 6a7a9e52ed2ccfa86c2def3a66a368a5577f2fc2 Mon Sep 17 00:00:00 2001
2 From: John Daley <johndale@cisco.com>
3 Date: Tue, 3 May 2016 13:56:05 -0700
4 Subject: [PATCH] enic: Set PKT_RX_VLAN_PKT iff returned packet has VLAN tag
6 Only set the ol_flags PKT_RX_VLAN_PKT bit if the packet being passed
7 to the application contains a VLAN tag. This is true whether
8 stripping is enabled or disabled.
10 This area of the API is in flux, so behaviour may change in the
13 Signed-off-by: John Daley <johndale@cisco.com>
15 drivers/net/enic/enic_rxtx.c | 7 +++++--
16 1 file changed, 5 insertions(+), 2 deletions(-)
18 diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c
19 index 02b54dd..6a95389 100644
20 --- a/drivers/net/enic/enic_rxtx.c
21 +++ b/drivers/net/enic/enic_rxtx.c
22 @@ -206,12 +206,15 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf)
23 if (unlikely(!enic_cq_rx_desc_eop(ciflags)))
26 - /* VLAN stripping */
27 + /* VLAN stripping. Set PKT_RX_VLAN_PKT only if there is a vlan tag
28 + * in the packet passed up
30 if (bwflags & CQ_ENET_RQ_DESC_FLAGS_VLAN_STRIPPED) {
31 - pkt_flags |= PKT_RX_VLAN_PKT;
32 mbuf->vlan_tci = enic_cq_rx_desc_vlan(cqrd);
35 + if (enic_cq_rx_desc_vlan(cqrd))
36 + pkt_flags |= PKT_RX_VLAN_PKT;