summaryrefslogtreecommitdiff
path: root/drivers/net/enic
diff options
context:
space:
mode:
authorHyong Youb Kim <hyonkim@cisco.com>2018-09-25 19:54:19 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-11 18:53:48 +0200
commitfe5383d133f484d7cb2ad385bbf1e43ad7078682 (patch)
tree5c22ff3b217e6bf8797d00333fd35d695554ca4f /drivers/net/enic
parentc0aae00d7da0012599dd692912244eee1f7385cc (diff)
downloaddpdk-next-eventdev-fe5383d133f484d7cb2ad385bbf1e43ad7078682.zip
dpdk-next-eventdev-fe5383d133f484d7cb2ad385bbf1e43ad7078682.tar.gz
dpdk-next-eventdev-fe5383d133f484d7cb2ad385bbf1e43ad7078682.tar.xz
net/enic: set Rx VLAN offload flag for non-stripped packets
The NIC indicates VLAN TCI to the driver even when VLAN stripping is disabled. The driver sets mbuf's vlan_tci but not PKT_RX_VLAN. Set PKT_RX_VLAN to indicate that vlan_tci is valid. Fixes: c6f455507411 ("net/enic: add ethernet VLAN packet type") Cc: stable@dpdk.org Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com> Reviewed-by: John Daley <johndale@cisco.com>
Diffstat (limited to 'drivers/net/enic')
-rw-r--r--drivers/net/enic/enic_rxtx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c
index 7129e12..0eb113d 100644
--- a/drivers/net/enic/enic_rxtx.c
+++ b/drivers/net/enic/enic_rxtx.c
@@ -233,10 +233,12 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf)
pkt_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
mbuf->packet_type |= RTE_PTYPE_L2_ETHER;
} else {
- if (vlan_tci != 0)
+ if (vlan_tci != 0) {
+ pkt_flags |= PKT_RX_VLAN;
mbuf->packet_type |= RTE_PTYPE_L2_ETHER_VLAN;
- else
+ } else {
mbuf->packet_type |= RTE_PTYPE_L2_ETHER;
+ }
}
mbuf->vlan_tci = vlan_tci;