From 2444d35dc14621c185a8c5042adfb636e5056d2b Mon Sep 17 00:00:00 2001 From: Beilei Xing Date: Wed, 12 May 2021 16:10:14 +0800 Subject: [PATCH] net/iavf: fix Tx context descriptor The QW0 of Tx context descriptor should be reset to 0, otherwise the previous hardware writeback value may pollute the next context descriptor write. Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx") Cc: stable@dpdk.org Signed-off-by: Qi Zhang Signed-off-by: Beilei Xing Acked-by: Qi Zhang --- drivers/net/iavf/iavf_rxtx.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 74b5ab5bde..6a713df828 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -2245,6 +2245,11 @@ iavf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) (volatile struct iavf_tx_context_desc *) &txr[tx_id]; + /* clear QW0 or the previous writeback value + * may impact next write + */ + *(volatile uint64_t *)ctx_txd = 0; + txn = &sw_ring[txe->next_id]; RTE_MBUF_PREFETCH_TO_FREE(txn->mbuf); if (txe->mbuf) { -- 2.20.1