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 4D1F44591F; Fri, 6 Sep 2024 16:11:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B3CEC42F7A; Fri, 6 Sep 2024 16:11:44 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mails.dpdk.org (Postfix) with ESMTP id 8597E42F63; Fri, 6 Sep 2024 16:11:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725631902; x=1757167902; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qfTnZOwyM2EpTQTNeORCAt49vDBSMTIZV29Dfsqb0+o=; b=g81jIXLbMkQM6K6xHHMOpD6JxlMmSAHnMdpjom92KT1dIbrx4NWS0BX3 Wi3KcQrShNpdDvNZC/MACmZOqKzJOyb8gqLDXbt83iMTYc9+L3xYZgM1N sGiy620nbgShXGZpw2E7xoZBIx2LVdKlTz05UTEb/XePLdEuIR+mWRqcs LPWBH4wxqnDOqAH5+J4TN03dfFUsRq6eaVc+4G748jLoS/zzvXo2wLOl2 TY9HE28s06Bq4c9yD3OzMrC4E4E1QNoER7b6vBNakstaN/yfb5WrQ4583 neD2RoI3eDdY/i69KOYNH1FhWZntAA2pnK/2Mtt0lH7OFlXqWP3nRQEZm g==; X-CSE-ConnectionGUID: 7jabdE4sRb2EhKtGGK6QDw== X-CSE-MsgGUID: SrKs2Od1TgGtUml2YLYX1A== X-IronPort-AV: E=McAfee;i="6700,10204,11187"; a="41899790" X-IronPort-AV: E=Sophos;i="6.10,208,1719903600"; d="scan'208";a="41899790" 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:41 -0700 X-CSE-ConnectionGUID: bmu1H5hfTdamXb3+G0XqoA== X-CSE-MsgGUID: qf/t+pyZRmW25Q3AsU+M1g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,208,1719903600"; d="scan'208";a="70378162" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.39]) by fmviesa005.fm.intel.com with ESMTP; 06 Sep 2024 07:11:40 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , stable@dpdk.org Subject: [PATCH 2/4] net/ice: fix AVX-512 pointer copy on 32-bit Date: Fri, 6 Sep 2024 15:11:25 +0100 Message-ID: <20240906141127.628873-3-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: 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 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: a4e480de268e ("net/ice: optimize Tx by using AVX512") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson --- drivers/net/ice/ice_rxtx_vec_avx512.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ice/ice_rxtx_vec_avx512.c b/drivers/net/ice/ice_rxtx_vec_avx512.c index 04148e8ea2..add095ef06 100644 --- a/drivers/net/ice/ice_rxtx_vec_avx512.c +++ b/drivers/net/ice/ice_rxtx_vec_avx512.c @@ -907,6 +907,7 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq) uint32_t copied = 0; /* n is multiple of 32 */ while (copied < n) { +#ifdef RTE_ARCH_64 const __m512i a = _mm512_loadu_si512(&txep[copied]); const __m512i b = _mm512_loadu_si512(&txep[copied + 8]); const __m512i c = _mm512_loadu_si512(&txep[copied + 16]); @@ -916,6 +917,12 @@ ice_tx_free_bufs_avx512(struct ice_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_loadu_si512(&txep[copied]); + const __m512i b = _mm512_loadu_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