From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1FE0DA0C43 for ; Wed, 12 May 2021 10:18:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 13692410F6; Wed, 12 May 2021 10:18:21 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 9BA304003E; Wed, 12 May 2021 10:18:18 +0200 (CEST) IronPort-SDR: I2r7IXLBCQ81CZy5aKw/G4R9O2ZG1upQsOzSeE8XRhEosD683uCTYraJM0tqCxw9dXlsaNWeVk JZooxAQq2G5w== X-IronPort-AV: E=McAfee;i="6200,9189,9981"; a="220618705" X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="220618705" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2021 01:18:11 -0700 IronPort-SDR: otEZIr1H0DpJuhxVukmQ2JtreYsprRU6sHVCppallKYZTbcKZkS8TbbvVaDAhAB5Fdl06L+/DD mPlCi48dc8Kg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="392629798" Received: from dpdk-beileix-3.sh.intel.com ([10.67.110.150]) by orsmga006.jf.intel.com with ESMTP; 12 May 2021 01:18:09 -0700 From: beilei.xing@intel.com To: qi.z.zhang@intel.com Cc: dev@dpdk.org, Beilei Xing , stable@dpdk.org Date: Wed, 12 May 2021 16:04:00 +0800 Message-Id: <20210512080400.103225-1-beilei.xing@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v2] net/iavf: fix wrong Tx context descriptor X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: 20210512070646.102006-1-beilei.xing@intel.com Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Beilei Xing 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 --- v2 change: - Typo fix. 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.26.2