[v2] net/iavf: fix wrong Tx context descriptor

Message ID 20210512081014.103374-1-beilei.xing@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series [v2] net/iavf: fix wrong Tx context descriptor |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/github-robot success github build: passed
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-mellanox-Functional success Functional Testing PASS

Commit Message

Xing, Beilei May 12, 2021, 8:10 a.m. UTC
  From: Beilei Xing <beilei.xing@intel.com>

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>
---
v2 change:
 - Typo fix.

 drivers/net/iavf/iavf_rxtx.c | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Qi Zhang May 12, 2021, 8:51 a.m. UTC | #1
> -----Original Message-----
> From: Xing, Beilei <beilei.xing@intel.com>
> Sent: Wednesday, May 12, 2021 4:10 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>; stable@dpdk.org
> Subject: [PATCH v2] net/iavf: fix wrong Tx context descriptor
> 
> From: Beilei Xing <beilei.xing@intel.com>
> 
> 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>

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

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) {