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 4B5F6A0546 for ; Sat, 1 May 2021 03:48:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1AF444003F; Sat, 1 May 2021 03:48:30 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 338CE4003F for ; Sat, 1 May 2021 03:48:28 +0200 (CEST) IronPort-SDR: qnKoXqqtVnHGZVvAJ08kdf5Yn0DNm4QNYGPnkwAmIDPXomkwM+ZffSUB4Vl02xkOgDvyc2jIPF h7RdD9vuVpDA== X-IronPort-AV: E=McAfee;i="6200,9189,9970"; a="196971699" X-IronPort-AV: E=Sophos;i="5.82,264,1613462400"; d="scan'208";a="196971699" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2021 18:48:28 -0700 IronPort-SDR: ktz5a/8zlpwzHxHZ19M1Zdz2CQLs1cjzzKzs2daiQkeSgtmlrPGE7uxsChxfYcOsv0PvdGeV3H M/43cCNetTUg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,264,1613462400"; d="scan'208";a="467064917" Received: from dpdk51.sh.intel.com ([10.67.111.142]) by orsmga001.jf.intel.com with ESMTP; 30 Apr 2021 18:48:26 -0700 From: Qi Zhang To: beilei.xing@intel.com Cc: stable@dpdk.org, bluca@debian.org, timothy.miskell@intel.com, arjun.anantharam@intel.com, Qi Zhang Date: Sat, 1 May 2021 09:52:10 +0800 Message-Id: <20210501015210.2992816-1-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH] 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" The QW0 of Tx context descriptor should be reset to 0, otherwise the previous hardware writeback value may polute the next context descriptor write. Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx") Cc: stable@dpdk.org Signed-off-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 21d508b3f4..702efc695f 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -2173,6 +2173,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