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 8E0B045BC0 for ; Thu, 24 Oct 2024 11:48:53 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 87E604003C; Thu, 24 Oct 2024 11:48:53 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by mails.dpdk.org (Postfix) with ESMTP id 0DAB84003C for ; Thu, 24 Oct 2024 11:48:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729763333; x=1761299333; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=iT4LB5pHP+eaOgovFXy0AEe9Rnj6FWpa0IVdmdO9WxU=; b=FiBrvXOd07AUH+Kkkz55JWXjJR7NMoUrHX8jl8WYwUEDMQITiwQry+CT i9sHw+seP3b/Gd0SN1qRpu99Io+jW3mGNzLUqwdF8B0Mm7ZjQw32N42/Z lPw+3TUuWXfy2JeOHj8+5lnqYwtK/aF6+LGl6Uy7quQPhDSLpyG4lz7xg g2nvBUQwq7/ZsFMmxguLLFGYWklRTEDh73O9WZMUlXlmxPQHzBLvtCj/6 nw2do3P+UQzrDIqihjBNWaA3ds5kw2AW8PAvjHce9lOIzWs6pVP32pHOo aCQzZqOqrctNs0OV0IMZ8IN20IdXRJ/+2cNPy6K05VjwgOHceuQ+/GcXA Q==; X-CSE-ConnectionGUID: tn5jWBfsSgSONvoAq0RmTg== X-CSE-MsgGUID: ZAHgQ3uqRy60N/V+LC9l9A== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="33073134" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="33073134" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2024 02:48:52 -0700 X-CSE-ConnectionGUID: IxftSVe5Rv2ssUmJABN8GA== X-CSE-MsgGUID: 6E7u5N4URdyCG/Yvhtyfvg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,228,1725346800"; d="scan'208";a="80533709" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa009.fm.intel.com with ESMTP; 24 Oct 2024 02:48:50 -0700 From: Bruce Richardson To: stable@dpdk.org Cc: Bruce Richardson , Ian Stokes Subject: [PATCH 22.11] net/idpf: fix AVX-512 pointer copy on 32-bit Date: Thu, 24 Oct 2024 10:48:33 +0100 Message-ID: <20241024094833.962809-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 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 [ upstream commit d16364e3bdbfd9e07a487bf776a829c565337e3c ] 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: 5bf87b45b2c8 ("net/idpf: add AVX512 data path for single queue model") Signed-off-by: Bruce Richardson Acked-by: Ian Stokes --- drivers/net/idpf/idpf_rxtx_vec_avx512.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/idpf/idpf_rxtx_vec_avx512.c b/drivers/net/idpf/idpf_rxtx_vec_avx512.c index f31582f5fd..29f9624a9d 100644 --- a/drivers/net/idpf/idpf_rxtx_vec_avx512.c +++ b/drivers/net/idpf/idpf_rxtx_vec_avx512.c @@ -587,6 +587,7 @@ idpf_tx_free_bufs_avx512(struct idpf_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]); @@ -596,6 +597,12 @@ idpf_tx_free_bufs_avx512(struct idpf_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