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 42FCC4591F for ; Fri, 6 Sep 2024 16:11:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3386A42F43; Fri, 6 Sep 2024 16:11:41 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mails.dpdk.org (Postfix) with ESMTP id 5B6AC42F39; Fri, 6 Sep 2024 16:11:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725631900; x=1757167900; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=97h8RNrziomixaSRKFEqSmIcYvFXjMJP/zURpbk0Bfk=; b=QZAMy/d/3/OFURuRNqakBjszQf4JOLhd4e0ZL6dz2wCPWuPu12DTSjDx EZges/sbsnVCdvGY0gyVXj6Im8tX66mAm8vtIX6fn7MlenwrF24u94k55 f1figWvz6CLL2cXNIwFavSMvy2O36NDtCXRdd37FACoDKZ+qYj6+ljEWo r3cZ5c+Bo7AMI/NtsiT55X1zuXbTEEeJvdFxcyMcqqjT0PAco/7/rYjOS 10FEmKiJ+bGgtLZbU8+f1D+HgG8SFb3I6OhbhlVxqag0utBsc9svIbM0D XhiDp/fuVnTxnkWjyPiGSYOMrVV8XoRVoLNKHD3UjaFzKJWrEMOezxvrB A==; X-CSE-ConnectionGUID: 56azZ0W7TbWjs6LpDzBR/w== X-CSE-MsgGUID: /zqZS6nGShCWBiyiyVL7Ug== X-IronPort-AV: E=McAfee;i="6700,10204,11187"; a="41899766" X-IronPort-AV: E=Sophos;i="6.10,208,1719903600"; d="scan'208";a="41899766" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2024 07:11:39 -0700 X-CSE-ConnectionGUID: ZFMamRwwQT6wuVNp2nTs3A== X-CSE-MsgGUID: xWq2HPnfQM2FABo0J+DGSw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,208,1719903600"; d="scan'208";a="70378156" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.39]) by fmviesa005.fm.intel.com with ESMTP; 06 Sep 2024 07:11:38 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , stable@dpdk.org Subject: [PATCH 1/4] net/i40e: fix AVX-512 pointer copy on 32-bit Date: Fri, 6 Sep 2024 15:11:24 +0100 Message-ID: <20240906141127.628873-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240906141127.628873-1-bruce.richardson@intel.com> References: <20240906141127.628873-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The size of a pointer on 32-bit is only 4 rather than 8 bytes, so copying 32 pointers only requires half the number of AVX-512 load store operations. Fixes: 5171b4ee6b6b ("net/i40e: optimize Tx by using AVX512") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson --- drivers/net/i40e/i40e_rxtx_vec_avx512.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx512.c b/drivers/net/i40e/i40e_rxtx_vec_avx512.c index 0238b03f8a..3b2750221b 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_avx512.c +++ b/drivers/net/i40e/i40e_rxtx_vec_avx512.c @@ -799,6 +799,7 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq) uint32_t copied = 0; /* n is multiple of 32 */ while (copied < n) { +#ifdef RTE_ARCH_64 const __m512i a = _mm512_load_si512(&txep[copied]); const __m512i b = _mm512_load_si512(&txep[copied + 8]); const __m512i c = _mm512_load_si512(&txep[copied + 16]); @@ -808,6 +809,12 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq) _mm512_storeu_si512(&cache_objs[copied + 8], b); _mm512_storeu_si512(&cache_objs[copied + 16], c); _mm512_storeu_si512(&cache_objs[copied + 24], d); +#else + const __m512i a = _mm512_load_si512(&txep[copied]); + const __m512i b = _mm512_load_si512(&txep[copied + 16]); + _mm512_storeu_si512(&cache_objs[copied], a); + _mm512_storeu_si512(&cache_objs[copied + 16], b); +#endif copied += 32; } cache->len += n; -- 2.43.0