net/iavf: fix Tx context descriptor
authorBeilei Xing <beilei.xing@intel.com>
Wed, 12 May 2021 08:10:14 +0000 (16:10 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Wed, 12 May 2021 08:52:54 +0000 (10:52 +0200)
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 <qi.z.zhang@intel.com>
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/iavf/iavf_rxtx.c

index 74b5ab5..6a713df 100644 (file)
@@ -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) {