From: Harish Patil Date: Tue, 25 Apr 2017 07:28:40 +0000 (-0700) Subject: net/qede: use new stripped VLAN mbuf flags X-Git-Tag: spdx-start~3351 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a8ebf42f5620e69292b76d89becfae711cacce2f;p=dpdk.git net/qede: use new stripped VLAN mbuf flags Use new mbuf flags PKT_RX_VLAN_STRIPPED and PKT_RX_QINQ_STRIPPED introduced by the patch: commit b37b528d957c ("mbuf: add new Rx flags for stripped VLAN") Signed-off-by: Harish Patil --- diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index b31a7df861..fdb6bb16d2 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -604,6 +604,7 @@ static int qede_vlan_stripping(struct rte_eth_dev *eth_dev, bool set_stripping) DP_ERR(edev, "Update V-PORT failed %d\n", rc); return rc; } + qdev->vlan_strip_flg = set_stripping; return 0; } diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h index f5549c25bb..6d5e616fcd 100644 --- a/drivers/net/qede/qede_ethdev.h +++ b/drivers/net/qede/qede_ethdev.h @@ -211,6 +211,7 @@ struct qede_dev { uint16_t num_tunn_filters; uint16_t vxlan_filter_type; struct qede_fdir_info fdir_info; + bool vlan_strip_flg; char drv_ver[QEDE_PMD_DRV_VER_STR_SIZE]; }; diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c index b180c0b95e..191d8aff47 100644 --- a/drivers/net/qede/qede_rxtx.c +++ b/drivers/net/qede/qede_rxtx.c @@ -1132,11 +1132,17 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) if (CQE_HAS_VLAN(parse_flag)) { ol_flags |= PKT_RX_VLAN_PKT; - rx_mb->vlan_tci = vlan_tci; + if (qdev->vlan_strip_flg) { + ol_flags |= PKT_RX_VLAN_STRIPPED; + rx_mb->vlan_tci = vlan_tci; + } } if (CQE_HAS_OUTER_VLAN(parse_flag)) { ol_flags |= PKT_RX_QINQ_PKT; - rx_mb->vlan_tci = vlan_tci; + if (qdev->vlan_strip_flg) { + rx_mb->vlan_tci = vlan_tci; + ol_flags |= PKT_RX_QINQ_STRIPPED; + } rx_mb->vlan_tci_outer = 0; } /* RSS Hash */