From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Daley Subject: [PATCH 3/6] net/enic: set Rx VLAN offload flag for non-stripped packets Date: Tue, 25 Sep 2018 19:54:19 -0700 Message-ID: <20180926025422.21912-3-johndale@cisco.com> References: <20180926025422.21912-1-johndale@cisco.com> Cc: dev@dpdk.org, Hyong Youb Kim , stable@dpdk.org To: ferruh.yigit@intel.com Return-path: In-Reply-To: <20180926025422.21912-1-johndale@cisco.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Hyong Youb Kim 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 Reviewed-by: John Daley --- drivers/net/enic/enic_rxtx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c index 7129e1217..0eb113d75 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; -- 2.16.2