Skip to content

Commit

Permalink
net/fm10k: fix descriptor VLAN field filling in Tx
Browse files Browse the repository at this point in the history
[ upstream commit 6aab203 ]

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: 4b61d3b ("fm10k: add receive and tranmit")

Signed-off-by: Lu Qiuwen <luqiuwen@iie.ac.cn>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
  • Loading branch information
luqiuwen authored and kevintraynor committed Feb 7, 2020
1 parent b89ae65 commit 4165ec9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/fm10k/fm10k_rxtx.c
Expand Up @@ -584,6 +584,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 =
Expand Down

0 comments on commit 4165ec9

Please sign in to comment.