[dpdk-dev,1/3] net/thunderx: disable pmd for gcc < 4.7
Checks
Commit Message
PMD uses some compiler builtins and new compiler options. Tested with
gcc 4.5.1 and following were not supported:
option:
-Ofast
macros:
_Static_assert
__ORDER_LITTLE_ENDIAN__
__ORDER_BIG_ENDIAN__
__BYTE_ORDER__
__atomic_fetch_add
__ATOMIC_ACQUIRE
__atomic_load_n
__ATOMIC_RELAXED
__atomic_store_n
__ATOMIC_RELEASE
It is not easy to fix all in PMD, disabling PMD for gcc version < 4.7
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/thunderx/Makefile | 8 ++++++++
1 file changed, 8 insertions(+)
Comments
-----Original Message-----
> Date: Thu, 6 Apr 2017 13:14:26 +0100
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> To: Jerin Jacob <jerin.jacob@caviumnetworks.com>, Bruce Richardson
> <bruce.richardson@intel.com>, Harry van Haaren
> <harry.van.haaren@intel.com>, Thomas Monjalon <thomas.monjalon@6wind.com>
> Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>
> Subject: [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7
> X-Mailer: git-send-email 2.8.4
>
> PMD uses some compiler builtins and new compiler options. Tested with
> gcc 4.5.1 and following were not supported:
>
> option:
> -Ofast
>
> macros:
> _Static_assert
>
> __ORDER_LITTLE_ENDIAN__
> __ORDER_BIG_ENDIAN__
> __BYTE_ORDER__
>
> __atomic_fetch_add
> __ATOMIC_ACQUIRE
> __atomic_load_n
> __ATOMIC_RELAXED
> __atomic_store_n
> __ATOMIC_RELEASE
>
> It is not easy to fix all in PMD, disabling PMD for gcc version < 4.7
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> ---
> drivers/net/thunderx/Makefile | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/net/thunderx/Makefile b/drivers/net/thunderx/Makefile
> index 706250b..0b9f0a2 100644
> --- a/drivers/net/thunderx/Makefile
> +++ b/drivers/net/thunderx/Makefile
> @@ -62,6 +62,14 @@ SRCS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += nicvf_svf.c
>
> ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
> CFLAGS_nicvf_rxtx.o += -fno-prefetch-loop-arrays
> +
> +# Disable PMD for gcc < 4.7
> +ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1)
> +$(warning thunderx pmd not supported by gcc < 4.7)
> +LIB =
> +SRC-y =
> +endif
> +
> endif
> CFLAGS_nicvf_rxtx.o += -Ofast
>
> --
> 2.9.3
>
On 4/6/2017 1:14 PM, Ferruh Yigit wrote:
> PMD uses some compiler builtins and new compiler options. Tested with
> gcc 4.5.1 and following were not supported:
>
> option:
> -Ofast
>
> macros:
> _Static_assert
>
> __ORDER_LITTLE_ENDIAN__
> __ORDER_BIG_ENDIAN__
> __BYTE_ORDER__
>
> __atomic_fetch_add
> __ATOMIC_ACQUIRE
> __atomic_load_n
> __ATOMIC_RELAXED
> __atomic_store_n
> __ATOMIC_RELEASE
>
> It is not easy to fix all in PMD, disabling PMD for gcc version < 4.7
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Need to update patch to cover icc 14.0, will send a v2 soon.
2017-04-06 13:14, Ferruh Yigit:
> PMD uses some compiler builtins and new compiler options. Tested with
> gcc 4.5.1 and following were not supported:
>
> option:
> -Ofast
>
> macros:
> _Static_assert
>
> __ORDER_LITTLE_ENDIAN__
> __ORDER_BIG_ENDIAN__
> __BYTE_ORDER__
These ones should not be used as we have rte_byteorder.h.
Please Jerin, could you use it?
-----Original Message-----
> Date: Thu, 06 Apr 2017 15:52:40 +0200
> From: Thomas Monjalon <thomas.monjalon@6wind.com>
> To: Ferruh Yigit <ferruh.yigit@intel.com>, Jerin Jacob
> <jerin.jacob@caviumnetworks.com>
> Cc: Bruce Richardson <bruce.richardson@intel.com>, Harry van Haaren
> <harry.van.haaren@intel.com>, dev@dpdk.org
> Subject: Re: [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7
> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; )
>
> 2017-04-06 13:14, Ferruh Yigit:
> > PMD uses some compiler builtins and new compiler options. Tested with
> > gcc 4.5.1 and following were not supported:
> >
> > option:
> > -Ofast
> >
> > macros:
> > _Static_assert
> >
> > __ORDER_LITTLE_ENDIAN__
> > __ORDER_BIG_ENDIAN__
> > __BYTE_ORDER__
>
> These ones should not be used as we have rte_byteorder.h.
Sure. I will change to use rte_byteorder.h
>
> Please Jerin, could you use it?
@@ -62,6 +62,14 @@ SRCS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += nicvf_svf.c
ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
CFLAGS_nicvf_rxtx.o += -fno-prefetch-loop-arrays
+
+# Disable PMD for gcc < 4.7
+ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1)
+$(warning thunderx pmd not supported by gcc < 4.7)
+LIB =
+SRC-y =
+endif
+
endif
CFLAGS_nicvf_rxtx.o += -Ofast