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 1FA5E4591F for ; Fri, 6 Sep 2024 16:11:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2DF5442F99; Fri, 6 Sep 2024 16:11:47 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mails.dpdk.org (Postfix) with ESMTP id 2F71742F43; Fri, 6 Sep 2024 16:11:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725631904; x=1757167904; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0NFADeF/dfX/uS0w06n83Flug9E5GbHRv/AZmWbMqL4=; b=YETIa7+hcypNuIvmOgu/0r5OTB8I04EfoWVMIBS5qoYi+xWQI/UmdS/r zhKNH/D5bS4PnyPHgARhE99Zm8NSDz9XkTT6vwcHckgW0QflH6J57jm2I MGUCqsxoGXdqNS3n2BeiWcz90/YPNW5J+QIsmAyHXo+g2AkFEo8XvwfDB u7S2OYl/z+xkWyUBTz27p3FTQfcovd/yeKgUkA8izkIDOcyu17hvJwUFI T2EVPLLk9yiLW/W75CXuuwQByowt08yXDJBNajumeBvXDMacn+u6sx5pC i1vc4aIgPFsfgzvRmFgnGJYewHnlR/tUOq1lXlo7gMxu/S1O7tItyQhuT g==; X-CSE-ConnectionGUID: Er8+SNQeQHa9OxaF5DmWQQ== X-CSE-MsgGUID: tmNW8v+vQdqQtg5A4nReiQ== X-IronPort-AV: E=McAfee;i="6700,10204,11187"; a="41899812" X-IronPort-AV: E=Sophos;i="6.10,208,1719903600"; d="scan'208";a="41899812" 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:43 -0700 X-CSE-ConnectionGUID: jU70guJAR36fFtgHUZidEg== X-CSE-MsgGUID: uiF4wuN+QiOoKvDVEmxSyw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,208,1719903600"; d="scan'208";a="70378166" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.39]) by fmviesa005.fm.intel.com with ESMTP; 06 Sep 2024 07:11:42 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , stable@dpdk.org Subject: [PATCH 3/4] net/iavf: fix AVX-512 pointer copy on 32-bit Date: Fri, 6 Sep 2024 15:11:26 +0100 Message-ID: <20240906141127.628873-4-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: 9ab9514c150e ("net/iavf: enable AVX512 for Tx") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson --- drivers/net/iavf/iavf_rxtx_vec_avx512.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/iavf/iavf_rxtx_vec_avx512.c index 3bb6f305df..d6a861bf80 100644 --- a/drivers/net/iavf/iavf_rxtx_vec_avx512.c +++ b/drivers/net/iavf/iavf_rxtx_vec_avx512.c @@ -1892,6 +1892,7 @@ iavf_tx_free_bufs_avx512(struct iavf_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]); @@ -1901,6 +1902,12 @@ iavf_tx_free_bufs_avx512(struct iavf_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