From patchwork Wed May 12 08:10:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xing, Beilei" X-Patchwork-Id: 93192 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8CD00A0C42; Wed, 12 May 2021 10:24:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1CBAA4003F; Wed, 12 May 2021 10:24:33 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 16EDA4003E; Wed, 12 May 2021 10:24:30 +0200 (CEST) IronPort-SDR: MvJog92oPC/SKEUnTdgBzcBX7cESz3qxt5EMIW/FuKSS/JQ0lQIRAsQ5LFqKOkPL2nrkTGOHry AtZ89DZdB4tQ== X-IronPort-AV: E=McAfee;i="6200,9189,9981"; a="196555272" X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="196555272" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2021 01:24:25 -0700 IronPort-SDR: UldQnZjuXAapQX96SeamdvjVAiDjkHjqZLcnFuZzF01oHnm49kvRxFEkXWA6GGVpizKf2PDsP4 IEe3SUlvmfzw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="430641863" Received: from dpdk-beileix-3.sh.intel.com ([10.67.110.150]) by orsmga007.jf.intel.com with ESMTP; 12 May 2021 01:24:23 -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:10:14 +0800 Message-Id: <20210512081014.103374-1-beilei.xing@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210512070646.102006-1-beilei.xing@intel.com> References: <20210512070646.102006-1-beilei.xing@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2] net/iavf: fix wrong Tx context descriptor X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Acked-by: Qi Zhang --- 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) {