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 750BD4591F for ; Fri, 6 Sep 2024 16:11:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1A16E42FC1; Fri, 6 Sep 2024 16:11:49 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mails.dpdk.org (Postfix) with ESMTP id 049804025D; Fri, 6 Sep 2024 16:11:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725631905; x=1757167905; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yLgPwf7piWF4aP9XJMdwgmk2uyoaur7qCxmUhvwGEdE=; b=LOuBTrJsQrugjbW+rGCkwMQkKdSKMaXczREdqjj+Iza1ED0MtFYC1DYb wBfUMHP+sB2TVmwMJijncSWUMn7dOQKO4uOzHx+Wkjw+VPx86d5Be+wXM +oJJylxhtywGgCO57AojBbApzamykyhCLDRquZDnsZXTaoLf8z86bpTIT x0MUhRFtubCZpJAKp1oMDeeVBG5qDdQrOfML3YOkJ0Hwd6XZZUAL9Uz2D 6Ro9gfU5k1V2eJ3ODlPd0yjS5VZD5m6gLGSF4qsjnOUrJ1umn3WT9v2+X 4a/EOD723TOq+5wSLn5TE4+lozMrOV46xTs5+OK9zAcaJlTzKAjiyr2/L g==; X-CSE-ConnectionGUID: CqMc6iVFR5aOykAbRik+cw== X-CSE-MsgGUID: Bq5Y0amkShy5YfjQIJ1ONg== X-IronPort-AV: E=McAfee;i="6700,10204,11187"; a="41899838" X-IronPort-AV: E=Sophos;i="6.10,208,1719903600"; d="scan'208";a="41899838" 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:45 -0700 X-CSE-ConnectionGUID: OKFKfcqRRvq+ePTLoL09ag== X-CSE-MsgGUID: /26l8wisSj6+k2QtRPL+3Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,208,1719903600"; d="scan'208";a="70378172" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.39]) by fmviesa005.fm.intel.com with ESMTP; 06 Sep 2024 07:11:44 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , stable@dpdk.org Subject: [PATCH 4/4] common/idpf: fix AVX-512 pointer copy on 32-bit Date: Fri, 6 Sep 2024 15:11:27 +0100 Message-ID: <20240906141127.628873-5-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: 5bf87b45b2c8 ("net/idpf: add AVX512 data path for single queue model") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson --- drivers/common/idpf/idpf_common_rxtx_avx512.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/common/idpf/idpf_common_rxtx_avx512.c b/drivers/common/idpf/idpf_common_rxtx_avx512.c index 3b5e124ec8..b8450b03ae 100644 --- a/drivers/common/idpf/idpf_common_rxtx_avx512.c +++ b/drivers/common/idpf/idpf_common_rxtx_avx512.c @@ -1043,6 +1043,7 @@ idpf_tx_singleq_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]); @@ -1052,6 +1053,12 @@ idpf_tx_singleq_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