From 6aab203435040461f585fe9423e3dbdc0729c9fc Mon Sep 17 00:00:00 2001 From: Lu Qiuwen Date: Thu, 5 Dec 2019 21:30:08 +0800 Subject: [PATCH] net/fm10k: fix descriptor VLAN field filling in Tx The VLAN field in the descriptor is not filled when ol_flags has no VLAN flag. When the caller sends some packets with VLAN tags, but other packets do not have VLAN tags, the behavior of the program cannot be determined. Fixes: 4b61d3bfa941 ("fm10k: add receive and tranmit") Cc: stable@dpdk.org Signed-off-by: Lu Qiuwen Acked-by: Xiao Wang --- drivers/net/fm10k/fm10k_rxtx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c index 5c31121839..4accaa2cd6 100644 --- a/drivers/net/fm10k/fm10k_rxtx.c +++ b/drivers/net/fm10k/fm10k_rxtx.c @@ -611,6 +611,8 @@ static inline void tx_xmit_pkt(struct fm10k_tx_queue *q, struct rte_mbuf *mb) /* set vlan if requested */ if (mb->ol_flags & PKT_TX_VLAN_PKT) q->hw_ring[q->next_free].vlan = mb->vlan_tci; + else + q->hw_ring[q->next_free].vlan = 0; q->sw_ring[q->next_free] = mb; q->hw_ring[q->next_free].buffer_addr = -- 2.20.1