summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorStephen Hemminger <sthemmin@microsoft.com>2019-03-25 14:27:54 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2019-03-29 17:25:32 +0100
commit4339de851e55364d0f1f995babaa0006968870c0 (patch)
tree89b195c4cea3708f858606542626088f894b0a51 /drivers/net
parent7cb745230ffb39420387e612c79afa23e4d3b646 (diff)
downloaddpdk-next-eventdev-4339de851e55364d0f1f995babaa0006968870c0.zip
dpdk-next-eventdev-4339de851e55364d0f1f995babaa0006968870c0.tar.gz
dpdk-next-eventdev-4339de851e55364d0f1f995babaa0006968870c0.tar.xz
net/bnxt: fix Rx VLAN offload flags
The bnxt driver is not correctly setting the receive VLAN offload flags. When VLAN is offloaded the driver must set the PKT_RX_VLAN_STRIPPED flag. Actually, several drivers have the same bug, only most of the Intel drivers look right. Any driver that sets vlan_tci is probably stripping the tag, and should be setting RX_VLAN_STRIPPED. To quote rte_mbuf.h: /** * The RX packet is a 802.1q VLAN packet, and the tci has been * saved in in mbuf->vlan_tci. * If the flag PKT_RX_VLAN_STRIPPED is also present, the VLAN * header has been stripped from mbuf data, else it is still * present. */ Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bnxt/bnxt_rxr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 1bfc63d..dc695e1 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -154,7 +154,7 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
if (tpa_start1->flags2 &
rte_cpu_to_le_32(RX_TPA_START_CMPL_FLAGS2_META_FORMAT_VLAN)) {
mbuf->vlan_tci = rte_le_to_cpu_32(tpa_start1->metadata);
- mbuf->ol_flags |= PKT_RX_VLAN;
+ mbuf->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
}
if (likely(tpa_start1->flags2 &
rte_cpu_to_le_32(RX_TPA_START_CMPL_FLAGS2_L4_CS_CALC)))
@@ -437,7 +437,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
(RX_PKT_CMPL_METADATA_VID_MASK |
RX_PKT_CMPL_METADATA_DE |
RX_PKT_CMPL_METADATA_PRI_MASK);
- mbuf->ol_flags |= PKT_RX_VLAN;
+ mbuf->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
}
if (likely(RX_CMP_IP_CS_OK(rxcmp1)))