All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7
@ 2017-04-06 12:14 Ferruh Yigit
  2017-04-06 12:14 ` [PATCH 2/3] event/octeontx: fix compilation for gcc < 4.6 Ferruh Yigit
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Ferruh Yigit @ 2017-04-06 12:14 UTC (permalink / raw)
  To: Jerin Jacob, Bruce Richardson, Harry van Haaren, Thomas Monjalon
  Cc: dev, 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__

__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(+)

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

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

* [PATCH 2/3] event/octeontx: fix compilation for gcc < 4.6
  2017-04-06 12:14 [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7 Ferruh Yigit
@ 2017-04-06 12:14 ` Ferruh Yigit
  2017-04-06 12:26   ` Jerin Jacob
  2017-04-06 12:14 ` [PATCH 3/3] event/sw: fix build error for gcc 4.5.1 Ferruh Yigit
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Ferruh Yigit @ 2017-04-06 12:14 UTC (permalink / raw)
  To: Jerin Jacob, Bruce Richardson, Harry van Haaren, Thomas Monjalon
  Cc: dev, Ferruh Yigit

-Ofast option supported from gcc4.6 [1], for older versions using
"-O3 -ffast-math" instead.

[1] build error:
cc1: error: invalid option argument ‘-Ofast’

Also struct initialization build error [2] fixed.

[2] build error:
.../event/octeontx/ssovf_mbox.c: In function ‘mbox_send_request’:
.../event/octeontx/ssovf_mbox.c:95:9: error: unknown field ‘u64’
specified in initializer

Fixes: 32ff26393bb2 ("event/octeontx: add SSO HW device operations")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/event/octeontx/Makefile     | 9 +++++++++
 drivers/event/octeontx/ssovf_mbox.c | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/event/octeontx/Makefile b/drivers/event/octeontx/Makefile
index b26e35b..aca3d09 100644
--- a/drivers/event/octeontx/Makefile
+++ b/drivers/event/octeontx/Makefile
@@ -50,10 +50,19 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_worker.c
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_evdev.c
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_probe.c
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_mbox.c
+
 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
 CFLAGS_ssovf_worker.o += -fno-prefetch-loop-arrays
+
+ifeq ($(shell test $(GCC_VERSION) -ge 46 && echo 1), 1)
+CFLAGS_ssovf_worker.o += -Ofast
+else
+CFLAGS_ssovf_worker.o += -O3 -ffast-math
 endif
+
+else
 CFLAGS_ssovf_worker.o += -Ofast
+endif
 
 # install this header file
 SYMLINK-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF)-include := rte_pmd_octeontx_ssovf.h
diff --git a/drivers/event/octeontx/ssovf_mbox.c b/drivers/event/octeontx/ssovf_mbox.c
index 0435f6d..f42969c 100644
--- a/drivers/event/octeontx/ssovf_mbox.c
+++ b/drivers/event/octeontx/ssovf_mbox.c
@@ -92,7 +92,7 @@ mbox_send_request(struct mbox *m, struct octeontx_mbox_hdr *hdr,
 			const void *txmsg, uint16_t txsize)
 {
 	struct mbox_ram_hdr old_hdr;
-	struct mbox_ram_hdr new_hdr = {.u64 = 0};
+	struct mbox_ram_hdr new_hdr = {{0}};
 	uint64_t *ram_mbox_hdr = (uint64_t *)m->ram_mbox_base;
 	uint8_t *ram_mbox_msg = m->ram_mbox_base + sizeof(struct mbox_ram_hdr);
 
-- 
2.9.3

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

* [PATCH 3/3] event/sw: fix build error for gcc 4.5.1
  2017-04-06 12:14 [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7 Ferruh Yigit
  2017-04-06 12:14 ` [PATCH 2/3] event/octeontx: fix compilation for gcc < 4.6 Ferruh Yigit
@ 2017-04-06 12:14 ` Ferruh Yigit
  2017-04-06 12:21   ` Van Haaren, Harry
  2017-04-06 12:33 ` [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7 Jerin Jacob
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Ferruh Yigit @ 2017-04-06 12:14 UTC (permalink / raw)
  To: Jerin Jacob, Bruce Richardson, Harry van Haaren, Thomas Monjalon
  Cc: dev, Ferruh Yigit

build error:
.../event/sw/sw_evdev_worker.c: In function ‘sw_event_release’:
.../event/sw/sw_evdev_worker.c:52:3: error: unknown field ‘op’ specified
in initializer

Fixed by updating struct initialization.

Fixes: 656af9180014 ("event/sw: add worker core functions")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/event/sw/sw_evdev_worker.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/event/sw/sw_evdev_worker.c b/drivers/event/sw/sw_evdev_worker.c
index ed08778..b9b6f8d 100644
--- a/drivers/event/sw/sw_evdev_worker.c
+++ b/drivers/event/sw/sw_evdev_worker.c
@@ -48,9 +48,8 @@ sw_event_release(struct sw_port *p, uint8_t index)
 	RTE_SET_USED(index);
 
 	/* create drop message */
-	struct rte_event ev = {
-		.op = sw_qe_flag_map[RTE_EVENT_OP_RELEASE],
-	};
+	struct rte_event ev;
+	ev.op = sw_qe_flag_map[RTE_EVENT_OP_RELEASE];
 
 	uint16_t free_count;
 	qe_ring_enqueue_burst(p->rx_worker_ring, &ev, 1, &free_count);
-- 
2.9.3

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

* Re: [PATCH 3/3] event/sw: fix build error for gcc 4.5.1
  2017-04-06 12:14 ` [PATCH 3/3] event/sw: fix build error for gcc 4.5.1 Ferruh Yigit
@ 2017-04-06 12:21   ` Van Haaren, Harry
  0 siblings, 0 replies; 20+ messages in thread
From: Van Haaren, Harry @ 2017-04-06 12:21 UTC (permalink / raw)
  To: Yigit, Ferruh, Jerin Jacob, Richardson, Bruce, Thomas Monjalon; +Cc: dev

> From: Yigit, Ferruh
> Sent: Thursday, April 6, 2017 1:14 PM
> To: Jerin Jacob <jerin.jacob@caviumnetworks.com>; Richardson, Bruce
> <bruce.richardson@intel.com>; Van Haaren, Harry <harry.van.haaren@intel.com>; Thomas Monjalon
> <thomas.monjalon@6wind.com>
> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>
> Subject: [PATCH 3/3] event/sw: fix build error for gcc 4.5.1
> 
> build error:
> .../event/sw/sw_evdev_worker.c: In function ‘sw_event_release’:
> .../event/sw/sw_evdev_worker.c:52:3: error: unknown field ‘op’ specified
> in initializer
> 
> Fixed by updating struct initialization.
> 
> Fixes: 656af9180014 ("event/sw: add worker core functions")
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Acked-by: Harry van Haaren <harry.van.haaren@intel.com>

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

* Re: [PATCH 2/3] event/octeontx: fix compilation for gcc < 4.6
  2017-04-06 12:14 ` [PATCH 2/3] event/octeontx: fix compilation for gcc < 4.6 Ferruh Yigit
@ 2017-04-06 12:26   ` Jerin Jacob
  0 siblings, 0 replies; 20+ messages in thread
From: Jerin Jacob @ 2017-04-06 12:26 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Bruce Richardson, Harry van Haaren, Thomas Monjalon, dev

-----Original Message-----
> Date: Thu,  6 Apr 2017 13:14:27 +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 2/3] event/octeontx: fix compilation for gcc < 4.6
> X-Mailer: git-send-email 2.8.4
> 
> -Ofast option supported from gcc4.6 [1], for older versions using
> "-O3 -ffast-math" instead.
> 
> [1] build error:
> cc1: error: invalid option argument ‘-Ofast’
> 
> Also struct initialization build error [2] fixed.
> 
> [2] build error:
> .../event/octeontx/ssovf_mbox.c: In function ‘mbox_send_request’:
> .../event/octeontx/ssovf_mbox.c:95:9: error: unknown field ‘u64’
> specified in initializer
> 
> Fixes: 32ff26393bb2 ("event/octeontx: add SSO HW device operations")
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

> ---
>  drivers/event/octeontx/Makefile     | 9 +++++++++
>  drivers/event/octeontx/ssovf_mbox.c | 2 +-
>  2 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/event/octeontx/Makefile b/drivers/event/octeontx/Makefile
> index b26e35b..aca3d09 100644
> --- a/drivers/event/octeontx/Makefile
> +++ b/drivers/event/octeontx/Makefile
> @@ -50,10 +50,19 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_worker.c
>  SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_evdev.c
>  SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_probe.c
>  SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_mbox.c
> +
>  ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
>  CFLAGS_ssovf_worker.o += -fno-prefetch-loop-arrays
> +
> +ifeq ($(shell test $(GCC_VERSION) -ge 46 && echo 1), 1)
> +CFLAGS_ssovf_worker.o += -Ofast
> +else
> +CFLAGS_ssovf_worker.o += -O3 -ffast-math
>  endif
> +
> +else
>  CFLAGS_ssovf_worker.o += -Ofast
> +endif
>  
>  # install this header file
>  SYMLINK-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF)-include := rte_pmd_octeontx_ssovf.h
> diff --git a/drivers/event/octeontx/ssovf_mbox.c b/drivers/event/octeontx/ssovf_mbox.c
> index 0435f6d..f42969c 100644
> --- a/drivers/event/octeontx/ssovf_mbox.c
> +++ b/drivers/event/octeontx/ssovf_mbox.c
> @@ -92,7 +92,7 @@ mbox_send_request(struct mbox *m, struct octeontx_mbox_hdr *hdr,
>  			const void *txmsg, uint16_t txsize)
>  {
>  	struct mbox_ram_hdr old_hdr;
> -	struct mbox_ram_hdr new_hdr = {.u64 = 0};
> +	struct mbox_ram_hdr new_hdr = {{0}};
>  	uint64_t *ram_mbox_hdr = (uint64_t *)m->ram_mbox_base;
>  	uint8_t *ram_mbox_msg = m->ram_mbox_base + sizeof(struct mbox_ram_hdr);
>  
> -- 
> 2.9.3
> 

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

* Re: [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7
  2017-04-06 12:14 [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7 Ferruh Yigit
  2017-04-06 12:14 ` [PATCH 2/3] event/octeontx: fix compilation for gcc < 4.6 Ferruh Yigit
  2017-04-06 12:14 ` [PATCH 3/3] event/sw: fix build error for gcc 4.5.1 Ferruh Yigit
@ 2017-04-06 12:33 ` Jerin Jacob
  2017-04-06 13:05 ` Ferruh Yigit
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 20+ messages in thread
From: Jerin Jacob @ 2017-04-06 12:33 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Bruce Richardson, Harry van Haaren, Thomas Monjalon, dev

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

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

* Re: [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7
  2017-04-06 12:14 [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7 Ferruh Yigit
                   ` (2 preceding siblings ...)
  2017-04-06 12:33 ` [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7 Jerin Jacob
@ 2017-04-06 13:05 ` Ferruh Yigit
  2017-04-06 13:46 ` [PATCH v2 1/3] net/thunderx: disable pmd for older compilers Ferruh Yigit
  2017-04-06 13:52 ` [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7 Thomas Monjalon
  5 siblings, 0 replies; 20+ messages in thread
From: Ferruh Yigit @ 2017-04-06 13:05 UTC (permalink / raw)
  To: Jerin Jacob, Bruce Richardson, Harry van Haaren, Thomas Monjalon; +Cc: dev

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.

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

* [PATCH v2 1/3] net/thunderx: disable pmd for older compilers
  2017-04-06 12:14 [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7 Ferruh Yigit
                   ` (3 preceding siblings ...)
  2017-04-06 13:05 ` Ferruh Yigit
@ 2017-04-06 13:46 ` Ferruh Yigit
  2017-04-06 13:46   ` [PATCH v2 2/3] event/octeontx: fix build error for gcc < 4.6 Ferruh Yigit
                     ` (3 more replies)
  2017-04-06 13:52 ` [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7 Thomas Monjalon
  5 siblings, 4 replies; 20+ messages in thread
From: Ferruh Yigit @ 2017-04-06 13:46 UTC (permalink / raw)
  To: Jerin Jacob, Bruce Richardson, Harry van Haaren, Thomas Monjalon
  Cc: dev, Ferruh Yigit

Disable for gcc < 4.7 and icc <= 14.0

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 older compilers.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/thunderx/Makefile            | 15 +++++++++++++++
 mk/toolchain/gcc/rte.toolchain-compat.mk |  4 ++++
 mk/toolchain/icc/rte.toolchain-compat.mk |  4 ++++
 3 files changed, 23 insertions(+)

diff --git a/drivers/net/thunderx/Makefile b/drivers/net/thunderx/Makefile
index 706250b..f2acfcb 100644
--- a/drivers/net/thunderx/Makefile
+++ b/drivers/net/thunderx/Makefile
@@ -60,8 +60,23 @@ SRCS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += nicvf_ethdev.c
 SRCS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += nicvf_bsvf.c
 SRCS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += nicvf_svf.c
 
+# GCC
 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
 CFLAGS_nicvf_rxtx.o += -fno-prefetch-loop-arrays
+
+# Disable PMD for gcc < 4.7 in  mk/toolchain/gcc/rte.toolchain-compat.mk
+ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1)
+$(warning thunderx pmd not supported by gcc < 4.7)
+endif
+
+# ICC
+else ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
+
+# Disable PMD for icc <= 14.0 in  mk/toolchain/gcc/rte.toolchain-compat.mk
+ifeq ($(shell test $(ICC_MAJOR_VERSION) -le 14 && echo 1), 1)
+$(warning thunderx pmd not supported by icc <= 14.0)
+endif
+
 endif
 CFLAGS_nicvf_rxtx.o += -Ofast
 
diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk
index 6eed20c..fff14e1 100644
--- a/mk/toolchain/gcc/rte.toolchain-compat.mk
+++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
@@ -89,4 +89,8 @@ else
 	ifeq ($(shell test $(GCC_VERSION) -lt 42 && echo 1), 1)
 		MACHINE_CFLAGS := $(filter-out -march% -mtune% -msse%,$(MACHINE_CFLAGS))
 	endif
+
+	ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1)
+		CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=n
+	endif
 endif
diff --git a/mk/toolchain/icc/rte.toolchain-compat.mk b/mk/toolchain/icc/rte.toolchain-compat.mk
index 4134466..2d0e54b 100644
--- a/mk/toolchain/icc/rte.toolchain-compat.mk
+++ b/mk/toolchain/icc/rte.toolchain-compat.mk
@@ -64,6 +64,10 @@ else
 		MACHINE_CFLAGS := $(patsubst -march=core-avx2,-xCORE-AVX2,$(MACHINE_CFLAGS))
 		# remove westmere flags
 		MACHINE_CFLAGS := $(filter-out -mpclmul -maes,$(MACHINE_CFLAGS))
+
+		ifeq ($(shell test $(ICC_MAJOR_VERSION) -le 14 && echo 1), 1)
+			CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=n
+		endif
 	endif
 	# if icc version == 12.0
 	ifeq ($(shell test $(ICC_MAJOR_VERSION) -eq 12 && test $(ICC_MINOR_VERSION) -eq 0 && echo 1), 1)
-- 
2.9.3

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

* [PATCH v2 2/3] event/octeontx: fix build error for gcc < 4.6
  2017-04-06 13:46 ` [PATCH v2 1/3] net/thunderx: disable pmd for older compilers Ferruh Yigit
@ 2017-04-06 13:46   ` Ferruh Yigit
  2017-04-06 13:46   ` [PATCH v2 3/3] event/sw: fix build error for gcc 4.5.1 Ferruh Yigit
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 20+ messages in thread
From: Ferruh Yigit @ 2017-04-06 13:46 UTC (permalink / raw)
  To: Jerin Jacob, Bruce Richardson, Harry van Haaren, Thomas Monjalon
  Cc: dev, Ferruh Yigit

-Ofast option supported from gcc4.6 [1], for older versions using
"-O3 -ffast-math" instead.

[1] build error:
cc1: error: invalid option argument ‘-Ofast’

Also struct initialization build error [2] fixed.

[2] build error:
.../event/octeontx/ssovf_mbox.c: In function ‘mbox_send_request’:
.../event/octeontx/ssovf_mbox.c:95:9: error: unknown field ‘u64’
specified in initializer

Fixes: 32ff26393bb2 ("event/octeontx: add SSO HW device operations")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 drivers/event/octeontx/Makefile     | 9 +++++++++
 drivers/event/octeontx/ssovf_mbox.c | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/event/octeontx/Makefile b/drivers/event/octeontx/Makefile
index b26e35b..aca3d09 100644
--- a/drivers/event/octeontx/Makefile
+++ b/drivers/event/octeontx/Makefile
@@ -50,10 +50,19 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_worker.c
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_evdev.c
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_probe.c
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_mbox.c
+
 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
 CFLAGS_ssovf_worker.o += -fno-prefetch-loop-arrays
+
+ifeq ($(shell test $(GCC_VERSION) -ge 46 && echo 1), 1)
+CFLAGS_ssovf_worker.o += -Ofast
+else
+CFLAGS_ssovf_worker.o += -O3 -ffast-math
 endif
+
+else
 CFLAGS_ssovf_worker.o += -Ofast
+endif
 
 # install this header file
 SYMLINK-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF)-include := rte_pmd_octeontx_ssovf.h
diff --git a/drivers/event/octeontx/ssovf_mbox.c b/drivers/event/octeontx/ssovf_mbox.c
index 0435f6d..f42969c 100644
--- a/drivers/event/octeontx/ssovf_mbox.c
+++ b/drivers/event/octeontx/ssovf_mbox.c
@@ -92,7 +92,7 @@ mbox_send_request(struct mbox *m, struct octeontx_mbox_hdr *hdr,
 			const void *txmsg, uint16_t txsize)
 {
 	struct mbox_ram_hdr old_hdr;
-	struct mbox_ram_hdr new_hdr = {.u64 = 0};
+	struct mbox_ram_hdr new_hdr = {{0}};
 	uint64_t *ram_mbox_hdr = (uint64_t *)m->ram_mbox_base;
 	uint8_t *ram_mbox_msg = m->ram_mbox_base + sizeof(struct mbox_ram_hdr);
 
-- 
2.9.3

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

* [PATCH v2 3/3] event/sw: fix build error for gcc 4.5.1
  2017-04-06 13:46 ` [PATCH v2 1/3] net/thunderx: disable pmd for older compilers Ferruh Yigit
  2017-04-06 13:46   ` [PATCH v2 2/3] event/octeontx: fix build error for gcc < 4.6 Ferruh Yigit
@ 2017-04-06 13:46   ` Ferruh Yigit
  2017-04-06 13:59   ` [PATCH v2 1/3] net/thunderx: disable pmd for older compilers Thomas Monjalon
  2017-04-06 17:05   ` [PATCH v3 1/3] net/thunderx: disable PMD " Ferruh Yigit
  3 siblings, 0 replies; 20+ messages in thread
From: Ferruh Yigit @ 2017-04-06 13:46 UTC (permalink / raw)
  To: Jerin Jacob, Bruce Richardson, Harry van Haaren, Thomas Monjalon
  Cc: dev, Ferruh Yigit

build error:
.../event/sw/sw_evdev_worker.c: In function ‘sw_event_release’:
.../event/sw/sw_evdev_worker.c:52:3: error: unknown field ‘op’ specified
in initializer

Fixed by updating struct initialization.

Fixes: 656af9180014 ("event/sw: add worker core functions")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 drivers/event/sw/sw_evdev_worker.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/event/sw/sw_evdev_worker.c b/drivers/event/sw/sw_evdev_worker.c
index ed08778..b9b6f8d 100644
--- a/drivers/event/sw/sw_evdev_worker.c
+++ b/drivers/event/sw/sw_evdev_worker.c
@@ -48,9 +48,8 @@ sw_event_release(struct sw_port *p, uint8_t index)
 	RTE_SET_USED(index);
 
 	/* create drop message */
-	struct rte_event ev = {
-		.op = sw_qe_flag_map[RTE_EVENT_OP_RELEASE],
-	};
+	struct rte_event ev;
+	ev.op = sw_qe_flag_map[RTE_EVENT_OP_RELEASE];
 
 	uint16_t free_count;
 	qe_ring_enqueue_burst(p->rx_worker_ring, &ev, 1, &free_count);
-- 
2.9.3

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

* Re: [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7
  2017-04-06 12:14 [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7 Ferruh Yigit
                   ` (4 preceding siblings ...)
  2017-04-06 13:46 ` [PATCH v2 1/3] net/thunderx: disable pmd for older compilers Ferruh Yigit
@ 2017-04-06 13:52 ` Thomas Monjalon
  2017-04-06 14:00   ` Jerin Jacob
  5 siblings, 1 reply; 20+ messages in thread
From: Thomas Monjalon @ 2017-04-06 13:52 UTC (permalink / raw)
  To: Ferruh Yigit, Jerin Jacob; +Cc: Bruce Richardson, Harry van Haaren, dev

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?

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

* Re: [PATCH v2 1/3] net/thunderx: disable pmd for older compilers
  2017-04-06 13:46 ` [PATCH v2 1/3] net/thunderx: disable pmd for older compilers Ferruh Yigit
  2017-04-06 13:46   ` [PATCH v2 2/3] event/octeontx: fix build error for gcc < 4.6 Ferruh Yigit
  2017-04-06 13:46   ` [PATCH v2 3/3] event/sw: fix build error for gcc 4.5.1 Ferruh Yigit
@ 2017-04-06 13:59   ` Thomas Monjalon
  2017-04-06 14:05     ` Ferruh Yigit
  2017-04-06 17:05   ` [PATCH v3 1/3] net/thunderx: disable PMD " Ferruh Yigit
  3 siblings, 1 reply; 20+ messages in thread
From: Thomas Monjalon @ 2017-04-06 13:59 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Jerin Jacob, Bruce Richardson, Harry van Haaren, dev

2017-04-06 14:46, Ferruh Yigit:
> --- a/mk/toolchain/gcc/rte.toolchain-compat.mk
> +++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
> @@ -89,4 +89,8 @@ else
>  	ifeq ($(shell test $(GCC_VERSION) -lt 42 && echo 1), 1)
>  		MACHINE_CFLAGS := $(filter-out -march% -mtune% -msse%,$(MACHINE_CFLAGS))
>  	endif
> +
> +	ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1)
> +		CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=n
> +	endif

In previous version you were disabling the PMD inside the PMD Makefile.
It was better.

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

* Re: [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7
  2017-04-06 13:52 ` [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7 Thomas Monjalon
@ 2017-04-06 14:00   ` Jerin Jacob
  0 siblings, 0 replies; 20+ messages in thread
From: Jerin Jacob @ 2017-04-06 14:00 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Ferruh Yigit, Bruce Richardson, Harry van Haaren, dev

-----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?

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

* Re: [PATCH v2 1/3] net/thunderx: disable pmd for older compilers
  2017-04-06 13:59   ` [PATCH v2 1/3] net/thunderx: disable pmd for older compilers Thomas Monjalon
@ 2017-04-06 14:05     ` Ferruh Yigit
  2017-04-06 14:09       ` Thomas Monjalon
  0 siblings, 1 reply; 20+ messages in thread
From: Ferruh Yigit @ 2017-04-06 14:05 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Jerin Jacob, Bruce Richardson, Harry van Haaren, dev

On 4/6/2017 2:59 PM, Thomas Monjalon wrote:
> 2017-04-06 14:46, Ferruh Yigit:
>> --- a/mk/toolchain/gcc/rte.toolchain-compat.mk
>> +++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
>> @@ -89,4 +89,8 @@ else
>>  	ifeq ($(shell test $(GCC_VERSION) -lt 42 && echo 1), 1)
>>  		MACHINE_CFLAGS := $(filter-out -march% -mtune% -msse%,$(MACHINE_CFLAGS))
>>  	endif
>> +
>> +	ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1)
>> +		CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=n
>> +	endif
> 
> In previous version you were disabling the PMD inside the PMD Makefile.
> It was better.

Agreed, but I that is causing a build error in applications. I have
missed it in previous release because an .a file was already created.

So, need a way to disable linking pmd against application.

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

* Re: [PATCH v2 1/3] net/thunderx: disable pmd for older compilers
  2017-04-06 14:05     ` Ferruh Yigit
@ 2017-04-06 14:09       ` Thomas Monjalon
  2017-04-06 14:46         ` Ferruh Yigit
  0 siblings, 1 reply; 20+ messages in thread
From: Thomas Monjalon @ 2017-04-06 14:09 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Jerin Jacob, Bruce Richardson, Harry van Haaren, dev

2017-04-06 15:05, Ferruh Yigit:
> On 4/6/2017 2:59 PM, Thomas Monjalon wrote:
> > 2017-04-06 14:46, Ferruh Yigit:
> >> --- a/mk/toolchain/gcc/rte.toolchain-compat.mk
> >> +++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
> >> @@ -89,4 +89,8 @@ else
> >>  	ifeq ($(shell test $(GCC_VERSION) -lt 42 && echo 1), 1)
> >>  		MACHINE_CFLAGS := $(filter-out -march% -mtune% -msse%,$(MACHINE_CFLAGS))
> >>  	endif
> >> +
> >> +	ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1)
> >> +		CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=n
> >> +	endif
> > 
> > In previous version you were disabling the PMD inside the PMD Makefile.
> > It was better.
> 
> Agreed, but I that is causing a build error in applications. I have
> missed it in previous release because an .a file was already created.
> 
> So, need a way to disable linking pmd against application.

I see.

If it is disabled here, we won't see the warning in the PMD Makefile?

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

* Re: [PATCH v2 1/3] net/thunderx: disable pmd for older compilers
  2017-04-06 14:09       ` Thomas Monjalon
@ 2017-04-06 14:46         ` Ferruh Yigit
  0 siblings, 0 replies; 20+ messages in thread
From: Ferruh Yigit @ 2017-04-06 14:46 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Jerin Jacob, Bruce Richardson, Harry van Haaren, dev

On 4/6/2017 3:09 PM, Thomas Monjalon wrote:
> 2017-04-06 15:05, Ferruh Yigit:
>> On 4/6/2017 2:59 PM, Thomas Monjalon wrote:
>>> 2017-04-06 14:46, Ferruh Yigit:
>>>> --- a/mk/toolchain/gcc/rte.toolchain-compat.mk
>>>> +++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
>>>> @@ -89,4 +89,8 @@ else
>>>>  	ifeq ($(shell test $(GCC_VERSION) -lt 42 && echo 1), 1)
>>>>  		MACHINE_CFLAGS := $(filter-out -march% -mtune% -msse%,$(MACHINE_CFLAGS))
>>>>  	endif
>>>> +
>>>> +	ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1)
>>>> +		CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=n
>>>> +	endif
>>>
>>> In previous version you were disabling the PMD inside the PMD Makefile.
>>> It was better.
>>
>> Agreed, but I that is causing a build error in applications. I have
>> missed it in previous release because an .a file was already created.
>>
>> So, need a way to disable linking pmd against application.
> 
> I see.
> 
> If it is disabled here, we won't see the warning in the PMD Makefile?

Oh, you are right, warnings in PMD Makefile become useless.

I can set another flag in compat headers and check it in pmd makefile,
will it be too much noise?

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

* [PATCH v3 1/3] net/thunderx: disable PMD for older compilers
  2017-04-06 13:46 ` [PATCH v2 1/3] net/thunderx: disable pmd for older compilers Ferruh Yigit
                     ` (2 preceding siblings ...)
  2017-04-06 13:59   ` [PATCH v2 1/3] net/thunderx: disable pmd for older compilers Thomas Monjalon
@ 2017-04-06 17:05   ` Ferruh Yigit
  2017-04-06 17:05     ` [PATCH v3 2/3] event/octeontx: fix build error for gcc < 4.6 Ferruh Yigit
                       ` (2 more replies)
  3 siblings, 3 replies; 20+ messages in thread
From: Ferruh Yigit @ 2017-04-06 17:05 UTC (permalink / raw)
  To: Jerin Jacob, Bruce Richardson, Harry van Haaren, Thomas Monjalon
  Cc: dev, Ferruh Yigit

Disable for gcc < 4.7 and icc <= 14.0

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 older compilers.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/Makefile                     | 5 +++++
 mk/toolchain/gcc/rte.toolchain-compat.mk | 5 +++++
 mk/toolchain/icc/rte.toolchain-compat.mk | 5 +++++
 3 files changed, 15 insertions(+)

diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index b94582d..3481eff 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -31,6 +31,11 @@
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
+# set in mk/toolchain/xxx/rte.toolchain-compat.mk
+ifeq ($(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD),d)
+        $(warning thunderx pmd is not supported by older compilers)
+endif
+
 core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_ether
 core-libs += librte_net librte_kvargs
 
diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk
index 6eed20c..280dde2 100644
--- a/mk/toolchain/gcc/rte.toolchain-compat.mk
+++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
@@ -89,4 +89,9 @@ else
 	ifeq ($(shell test $(GCC_VERSION) -lt 42 && echo 1), 1)
 		MACHINE_CFLAGS := $(filter-out -march% -mtune% -msse%,$(MACHINE_CFLAGS))
 	endif
+
+	# Disable thunderx PMD for gcc < 4.7
+	ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1)
+		CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=d
+	endif
 endif
diff --git a/mk/toolchain/icc/rte.toolchain-compat.mk b/mk/toolchain/icc/rte.toolchain-compat.mk
index 4134466..73770f7 100644
--- a/mk/toolchain/icc/rte.toolchain-compat.mk
+++ b/mk/toolchain/icc/rte.toolchain-compat.mk
@@ -72,4 +72,9 @@ else
 		# remove march options
 		MACHINE_CFLAGS := $(patsubst -march=%,-xSSE3,$(MACHINE_CFLAGS))
 	endif
+
+	# Disable thunderx PMD for icc <= 14.0
+	ifeq ($(shell test $(ICC_MAJOR_VERSION) -le 14 && echo 1), 1)
+		CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=d
+	endif
 endif
-- 
2.9.3

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

* [PATCH v3 2/3] event/octeontx: fix build error for gcc < 4.6
  2017-04-06 17:05   ` [PATCH v3 1/3] net/thunderx: disable PMD " Ferruh Yigit
@ 2017-04-06 17:05     ` Ferruh Yigit
  2017-04-06 17:05     ` [PATCH v3 3/3] event/sw: fix build error for gcc 4.5.1 Ferruh Yigit
  2017-04-06 18:40     ` [PATCH v3 1/3] net/thunderx: disable PMD for older compilers Thomas Monjalon
  2 siblings, 0 replies; 20+ messages in thread
From: Ferruh Yigit @ 2017-04-06 17:05 UTC (permalink / raw)
  To: Jerin Jacob, Bruce Richardson, Harry van Haaren, Thomas Monjalon
  Cc: dev, Ferruh Yigit

-Ofast option supported from gcc4.6 [1], for older versions using
"-O3 -ffast-math" instead.

[1] build error:
cc1: error: invalid option argument ‘-Ofast’

Also struct initialization build error [2] fixed.

[2] build error:
.../event/octeontx/ssovf_mbox.c: In function ‘mbox_send_request’:
.../event/octeontx/ssovf_mbox.c:95:9: error: unknown field ‘u64’
specified in initializer

Fixes: 32ff26393bb2 ("event/octeontx: add SSO HW device operations")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 drivers/event/octeontx/Makefile     | 9 +++++++++
 drivers/event/octeontx/ssovf_mbox.c | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/event/octeontx/Makefile b/drivers/event/octeontx/Makefile
index b26e35b..aca3d09 100644
--- a/drivers/event/octeontx/Makefile
+++ b/drivers/event/octeontx/Makefile
@@ -50,10 +50,19 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_worker.c
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_evdev.c
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_probe.c
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_mbox.c
+
 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
 CFLAGS_ssovf_worker.o += -fno-prefetch-loop-arrays
+
+ifeq ($(shell test $(GCC_VERSION) -ge 46 && echo 1), 1)
+CFLAGS_ssovf_worker.o += -Ofast
+else
+CFLAGS_ssovf_worker.o += -O3 -ffast-math
 endif
+
+else
 CFLAGS_ssovf_worker.o += -Ofast
+endif
 
 # install this header file
 SYMLINK-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF)-include := rte_pmd_octeontx_ssovf.h
diff --git a/drivers/event/octeontx/ssovf_mbox.c b/drivers/event/octeontx/ssovf_mbox.c
index 0435f6d..7394a3a 100644
--- a/drivers/event/octeontx/ssovf_mbox.c
+++ b/drivers/event/octeontx/ssovf_mbox.c
@@ -92,7 +92,7 @@ mbox_send_request(struct mbox *m, struct octeontx_mbox_hdr *hdr,
 			const void *txmsg, uint16_t txsize)
 {
 	struct mbox_ram_hdr old_hdr;
-	struct mbox_ram_hdr new_hdr = {.u64 = 0};
+	struct mbox_ram_hdr new_hdr = { {0} };
 	uint64_t *ram_mbox_hdr = (uint64_t *)m->ram_mbox_base;
 	uint8_t *ram_mbox_msg = m->ram_mbox_base + sizeof(struct mbox_ram_hdr);
 
-- 
2.9.3

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

* [PATCH v3 3/3] event/sw: fix build error for gcc 4.5.1
  2017-04-06 17:05   ` [PATCH v3 1/3] net/thunderx: disable PMD " Ferruh Yigit
  2017-04-06 17:05     ` [PATCH v3 2/3] event/octeontx: fix build error for gcc < 4.6 Ferruh Yigit
@ 2017-04-06 17:05     ` Ferruh Yigit
  2017-04-06 18:40     ` [PATCH v3 1/3] net/thunderx: disable PMD for older compilers Thomas Monjalon
  2 siblings, 0 replies; 20+ messages in thread
From: Ferruh Yigit @ 2017-04-06 17:05 UTC (permalink / raw)
  To: Jerin Jacob, Bruce Richardson, Harry van Haaren, Thomas Monjalon
  Cc: dev, Ferruh Yigit

build error:
.../event/sw/sw_evdev_worker.c: In function ‘sw_event_release’:
.../event/sw/sw_evdev_worker.c:52:3: error: unknown field ‘op’ specified
in initializer

Fixed by updating struct initialization.

Fixes: 656af9180014 ("event/sw: add worker core functions")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 drivers/event/sw/sw_evdev_worker.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/event/sw/sw_evdev_worker.c b/drivers/event/sw/sw_evdev_worker.c
index ed08778..b9b6f8d 100644
--- a/drivers/event/sw/sw_evdev_worker.c
+++ b/drivers/event/sw/sw_evdev_worker.c
@@ -48,9 +48,8 @@ sw_event_release(struct sw_port *p, uint8_t index)
 	RTE_SET_USED(index);
 
 	/* create drop message */
-	struct rte_event ev = {
-		.op = sw_qe_flag_map[RTE_EVENT_OP_RELEASE],
-	};
+	struct rte_event ev;
+	ev.op = sw_qe_flag_map[RTE_EVENT_OP_RELEASE];
 
 	uint16_t free_count;
 	qe_ring_enqueue_burst(p->rx_worker_ring, &ev, 1, &free_count);
-- 
2.9.3

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

* Re: [PATCH v3 1/3] net/thunderx: disable PMD for older compilers
  2017-04-06 17:05   ` [PATCH v3 1/3] net/thunderx: disable PMD " Ferruh Yigit
  2017-04-06 17:05     ` [PATCH v3 2/3] event/octeontx: fix build error for gcc < 4.6 Ferruh Yigit
  2017-04-06 17:05     ` [PATCH v3 3/3] event/sw: fix build error for gcc 4.5.1 Ferruh Yigit
@ 2017-04-06 18:40     ` Thomas Monjalon
  2 siblings, 0 replies; 20+ messages in thread
From: Thomas Monjalon @ 2017-04-06 18:40 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Jerin Jacob, Bruce Richardson, Harry van Haaren, dev

2017-04-06 18:05, Ferruh Yigit:
> Disable for gcc < 4.7 and icc <= 14.0
> 
> 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 older compilers.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Series applied, thanks

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

end of thread, other threads:[~2017-04-06 18:40 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-06 12:14 [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7 Ferruh Yigit
2017-04-06 12:14 ` [PATCH 2/3] event/octeontx: fix compilation for gcc < 4.6 Ferruh Yigit
2017-04-06 12:26   ` Jerin Jacob
2017-04-06 12:14 ` [PATCH 3/3] event/sw: fix build error for gcc 4.5.1 Ferruh Yigit
2017-04-06 12:21   ` Van Haaren, Harry
2017-04-06 12:33 ` [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7 Jerin Jacob
2017-04-06 13:05 ` Ferruh Yigit
2017-04-06 13:46 ` [PATCH v2 1/3] net/thunderx: disable pmd for older compilers Ferruh Yigit
2017-04-06 13:46   ` [PATCH v2 2/3] event/octeontx: fix build error for gcc < 4.6 Ferruh Yigit
2017-04-06 13:46   ` [PATCH v2 3/3] event/sw: fix build error for gcc 4.5.1 Ferruh Yigit
2017-04-06 13:59   ` [PATCH v2 1/3] net/thunderx: disable pmd for older compilers Thomas Monjalon
2017-04-06 14:05     ` Ferruh Yigit
2017-04-06 14:09       ` Thomas Monjalon
2017-04-06 14:46         ` Ferruh Yigit
2017-04-06 17:05   ` [PATCH v3 1/3] net/thunderx: disable PMD " Ferruh Yigit
2017-04-06 17:05     ` [PATCH v3 2/3] event/octeontx: fix build error for gcc < 4.6 Ferruh Yigit
2017-04-06 17:05     ` [PATCH v3 3/3] event/sw: fix build error for gcc 4.5.1 Ferruh Yigit
2017-04-06 18:40     ` [PATCH v3 1/3] net/thunderx: disable PMD for older compilers Thomas Monjalon
2017-04-06 13:52 ` [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7 Thomas Monjalon
2017-04-06 14:00   ` Jerin Jacob

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.