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 7BACAA0351; Tue, 21 Dec 2021 09:11:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4472C40040; Tue, 21 Dec 2021 09:11:37 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id 4C5D24003C for ; Tue, 21 Dec 2021 09:11:35 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C137B6D; Tue, 21 Dec 2021 00:11:34 -0800 (PST) Received: from net-x86-dell-8268.shanghai.arm.com (net-x86-dell-8268.shanghai.arm.com [10.169.210.123]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A2D0C3F5A1; Tue, 21 Dec 2021 00:11:32 -0800 (PST) From: Feifei Wang To: Beilei Xing Cc: dev@dpdk.org, haiyue.wang@intel.com, nd@arm.com, Feifei Wang , Ruifeng Wang Subject: [PATCH v2] net/i40e: reduce redundant store operation Date: Tue, 21 Dec 2021 16:11:21 +0800 Message-Id: <20211221081121.444021-1-feifei.wang2@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 For free buffer operation in i40e vector path, it is unnecessary to store 'NULL' into txep.mbuf. This is because when putting mbuf into Tx queue, tx_tail is the sentinel. And when doing tx_free, tx_next_dd is the sentinel. In all processes, mbuf==NULL is not a condition in check. Thus reset of mbuf is unnecessary and can be omitted. Signed-off-by: Feifei Wang Reviewed-by: Ruifeng Wang --- v2: remove the change for scalar path due to scalar path needs to check whether the mbuf is 'NULL' to release and clean up (Haiyue) drivers/net/i40e/i40e_rxtx_vec_common.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h index f9a7f46550..26deb59fc4 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_common.h +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h @@ -103,7 +103,6 @@ i40e_tx_free_bufs(struct i40e_tx_queue *txq) if (txq->offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) { for (i = 0; i < n; i++) { free[i] = txep[i].mbuf; - txep[i].mbuf = NULL; } rte_mempool_put_bulk(free[0]->pool, (void **)free, n); goto done; -- 2.25.1