DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] eal: fix undeclared function error on old CPUs
@ 2025-01-14 16:21 Andre Muezerie
  2025-01-14 16:32 ` Bruce Richardson
  0 siblings, 1 reply; 2+ messages in thread
From: Andre Muezerie @ 2025-01-14 16:21 UTC (permalink / raw)
  To: Bruce Richardson, Konstantin Ananyev, Neil Horman
  Cc: dev, Andre Muezerie, stable

Error reported:
../lib/net/net_crc_sse.c:49:17: error: call to undeclared function
'_mm_clmulepi64_si128'; ISO C99 and later do not support implicit
function declarations [-Wimplicit-function-declaration]

The fix is to remove the unnecessary ifdef around the inclusion of
header file immintrin.h. This header also contains functions that do
not require AVX instructions, so should not be included only when AVX
is available.

Bugzilla ID: 1595
Fixes: da826b7135a4 ("eal: introduce ymm type for AVX 256-bit")
Cc: stable@dpdk.org

Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
---
 lib/eal/x86/include/rte_vect.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/eal/x86/include/rte_vect.h b/lib/eal/x86/include/rte_vect.h
index 5ac3ccfd82..5fdcd632ac 100644
--- a/lib/eal/x86/include/rte_vect.h
+++ b/lib/eal/x86/include/rte_vect.h
@@ -19,9 +19,7 @@
 
 #if defined(__ICC) || defined(_WIN64)
 #include <smmintrin.h> /* SSE4 */
-#if defined(__AVX__)
 #include <immintrin.h>
-#endif
 #else
 #include <x86intrin.h>
 #endif
-- 
2.47.0.vfs.0.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] eal: fix undeclared function error on old CPUs
  2025-01-14 16:21 [PATCH] eal: fix undeclared function error on old CPUs Andre Muezerie
@ 2025-01-14 16:32 ` Bruce Richardson
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Richardson @ 2025-01-14 16:32 UTC (permalink / raw)
  To: Andre Muezerie; +Cc: Konstantin Ananyev, Neil Horman, dev, stable

On Tue, Jan 14, 2025 at 08:21:13AM -0800, Andre Muezerie wrote:
> Error reported:
> ../lib/net/net_crc_sse.c:49:17: error: call to undeclared function
> '_mm_clmulepi64_si128'; ISO C99 and later do not support implicit
> function declarations [-Wimplicit-function-declaration]
> 
> The fix is to remove the unnecessary ifdef around the inclusion of
> header file immintrin.h. This header also contains functions that do
> not require AVX instructions, so should not be included only when AVX
> is available.
> 
> Bugzilla ID: 1595
> Fixes: da826b7135a4 ("eal: introduce ymm type for AVX 256-bit")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
> ---

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

>  lib/eal/x86/include/rte_vect.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/lib/eal/x86/include/rte_vect.h b/lib/eal/x86/include/rte_vect.h
> index 5ac3ccfd82..5fdcd632ac 100644
> --- a/lib/eal/x86/include/rte_vect.h
> +++ b/lib/eal/x86/include/rte_vect.h
> @@ -19,9 +19,7 @@
>  
>  #if defined(__ICC) || defined(_WIN64)
>  #include <smmintrin.h> /* SSE4 */
> -#if defined(__AVX__)
>  #include <immintrin.h>
> -#endif
>  #else
>  #include <x86intrin.h>
>  #endif
> -- 
> 2.47.0.vfs.0.3
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-14 16:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-14 16:21 [PATCH] eal: fix undeclared function error on old CPUs Andre Muezerie
2025-01-14 16:32 ` Bruce Richardson

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).