DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	Harry van Haaren <harry.van.haaren@intel.com>,
	Thomas Monjalon <thomas.monjalon@6wind.com>,
	dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 2/3] event/octeontx: fix compilation for gcc < 4.6
Date: Thu, 6 Apr 2017 17:56:01 +0530	[thread overview]
Message-ID: <20170406122559.GA18255@jerin> (raw)
In-Reply-To: <20170406121428.16883-2-ferruh.yigit@intel.com>

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

  reply	other threads:[~2017-04-06 12:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-06 12:14 [dpdk-dev] [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7 Ferruh Yigit
2017-04-06 12:14 ` [dpdk-dev] [PATCH 2/3] event/octeontx: fix compilation for gcc < 4.6 Ferruh Yigit
2017-04-06 12:26   ` Jerin Jacob [this message]
2017-04-06 12:14 ` [dpdk-dev] [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 ` [dpdk-dev] [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 ` [dpdk-dev] [PATCH v2 1/3] net/thunderx: disable pmd for older compilers Ferruh Yigit
2017-04-06 13:46   ` [dpdk-dev] [PATCH v2 2/3] event/octeontx: fix build error for gcc < 4.6 Ferruh Yigit
2017-04-06 13:46   ` [dpdk-dev] [PATCH v2 3/3] event/sw: fix build error for gcc 4.5.1 Ferruh Yigit
2017-04-06 13:59   ` [dpdk-dev] [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   ` [dpdk-dev] [PATCH v3 1/3] net/thunderx: disable PMD " Ferruh Yigit
2017-04-06 17:05     ` [dpdk-dev] [PATCH v3 2/3] event/octeontx: fix build error for gcc < 4.6 Ferruh Yigit
2017-04-06 17:05     ` [dpdk-dev] [PATCH v3 3/3] event/sw: fix build error for gcc 4.5.1 Ferruh Yigit
2017-04-06 18:40     ` [dpdk-dev] [PATCH v3 1/3] net/thunderx: disable PMD for older compilers Thomas Monjalon
2017-04-06 13:52 ` [dpdk-dev] [PATCH 1/3] net/thunderx: disable pmd for gcc < 4.7 Thomas Monjalon
2017-04-06 14:00   ` Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170406122559.GA18255@jerin \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=harry.van.haaren@intel.com \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).