From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5138BA056A; Fri, 6 Mar 2020 06:05:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 800421BFDA; Fri, 6 Mar 2020 06:05:17 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 79EB41BFE8 for ; Fri, 6 Mar 2020 06:05:15 +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 0557130E; Thu, 5 Mar 2020 21:05:15 -0800 (PST) Received: from net-arm-thunderx2-04.shanghai.arm.com (net-arm-thunderx2-04.shanghai.arm.com [10.169.40.184]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E88723F6CF; Thu, 5 Mar 2020 21:05:11 -0800 (PST) From: Gavin Hu To: dev@dpdk.org Cc: nd@arm.com, david.marchand@redhat.com, thomas@monjalon.net, jerinj@marvell.com, xiaolong.ye@intel.com, Honnappa.Nagarahalli@arm.com, ruifeng.wang@arm.com, phil.yang@arm.com, joyce.kong@arm.com, steve.capper@arm.com Date: Fri, 6 Mar 2020 13:04:27 +0800 Message-Id: <20200306050427.66114-4-gavin.hu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200306050427.66114-1-gavin.hu@arm.com> References: <20200306050427.66114-1-gavin.hu@arm.com> Subject: [dpdk-dev] [PATCH v1 3/3] net/i40e: auto-vectorization to speed up Tx free X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Tx mbuf free is a hotspot for i40e on aarch64, as there are no inter-loop dependencies, it is safe to enable auto-vectorization to speed up. This patch showed 2~3% performance lift on ThunderX2 and no degradation on Arm N1SDP. The test case is single core RFC2544 zero-loss test. Signed-off-by: Gavin Hu Reviewed-by: Steve Capper --- drivers/net/i40e/i40e_rxtx_vec_common.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h index 0e6ffa007..fc0fa45d4 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_common.h +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h @@ -98,6 +98,11 @@ i40e_tx_free_bufs(struct i40e_tx_queue *txq) if (likely(m != NULL)) { free[0] = m; nb_free = 1; +#if defined(__clang__) +#pragma clang loop vectorize(assume_safety) +#elif defined(__GNUC__) +#pragma GCC ivdep +#endif for (i = 1; i < n; i++) { m = rte_pktmbuf_prefree_seg(txep[i].mbuf); if (likely(m != NULL)) { -- 2.17.1