* [PATCH 22.11] net/idpf: fix AVX-512 pointer copy on 32-bit
@ 2024-10-24 9:48 Bruce Richardson
2024-10-24 10:15 ` Luca Boccassi
0 siblings, 1 reply; 2+ messages in thread
From: Bruce Richardson @ 2024-10-24 9:48 UTC (permalink / raw)
To: stable; +Cc: Bruce Richardson, Ian Stokes
[ 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 <bruce.richardson@intel.com>
Acked-by: Ian Stokes <ian.stokes@intel.com>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 22.11] net/idpf: fix AVX-512 pointer copy on 32-bit
2024-10-24 9:48 [PATCH 22.11] net/idpf: fix AVX-512 pointer copy on 32-bit Bruce Richardson
@ 2024-10-24 10:15 ` Luca Boccassi
0 siblings, 0 replies; 2+ messages in thread
From: Luca Boccassi @ 2024-10-24 10:15 UTC (permalink / raw)
To: Bruce Richardson; +Cc: stable
On Thu, 24 Oct 2024 at 10:48, Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> [ 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 <bruce.richardson@intel.com>
> Acked-by: Ian Stokes <ian.stokes@intel.com>
> ---
> drivers/net/idpf/idpf_rxtx_vec_avx512.c | 7 +++++++
> 1 file changed, 7 insertions(+)
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-24 10:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-24 9:48 [PATCH 22.11] net/idpf: fix AVX-512 pointer copy on 32-bit Bruce Richardson
2024-10-24 10:15 ` Luca Boccassi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).