Skip to content

Commit 07d5607

Browse files
cloftusbruce-richardson
authored andcommitted
net/iavf: fix QinQ insertion for single packet Tx
QinQ insertion was enabled in the bulk transmit function but not the single packet transmit function. Implement it in the single packet function. Fixes: 3aa4efa ("net/iavf: support VLAN insertion in AVX512 Tx") Signed-off-by: Ciara Loftus <[email protected]> Acked-by: Bruce Richardson <[email protected]>
1 parent ce7d837 commit 07d5607

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2077,12 +2077,16 @@ ctx_vtx1(volatile struct iavf_tx_desc *txdp, struct rte_mbuf *pkt,
20772077
if (offload) {
20782078
iavf_fill_ctx_desc_tunneling_avx512(&low_ctx_qw, pkt);
20792079
#ifdef IAVF_TX_VLAN_QINQ_OFFLOAD
2080-
if (pkt->ol_flags & RTE_MBUF_F_TX_VLAN &&
2080+
if (pkt->ol_flags & RTE_MBUF_F_TX_QINQ) {
2081+
uint64_t qinq_tag = vlan_flag & IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2 ?
2082+
(uint64_t)pkt->vlan_tci_outer :
2083+
(uint64_t)pkt->vlan_tci;
2084+
high_ctx_qw |= IAVF_TX_CTX_DESC_IL2TAG2 << IAVF_TXD_CTX_QW1_CMD_SHIFT;
2085+
low_ctx_qw |= qinq_tag << IAVF_TXD_CTX_QW0_L2TAG2_PARAM;
2086+
} else if ((pkt->ol_flags & RTE_MBUF_F_TX_VLAN) &&
20812087
vlan_flag & IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2) {
2082-
high_ctx_qw |= IAVF_TX_CTX_DESC_IL2TAG2 <<
2083-
IAVF_TXD_CTX_QW1_CMD_SHIFT;
2084-
low_ctx_qw |= (uint64_t)pkt->vlan_tci <<
2085-
IAVF_TXD_CTX_QW0_L2TAG2_PARAM;
2088+
high_ctx_qw |= IAVF_TX_CTX_DESC_IL2TAG2 << IAVF_TXD_CTX_QW1_CMD_SHIFT;
2089+
low_ctx_qw |= (uint64_t)pkt->vlan_tci << IAVF_TXD_CTX_QW0_L2TAG2_PARAM;
20862090
}
20872091
#endif
20882092
}

0 commit comments

Comments
 (0)