DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3 0/2] gcc-8 build fixes
Date: Tue, 3 Apr 2018 08:10:36 -0700	[thread overview]
Message-ID: <20180403081036.4061b248@xeon-e3> (raw)
In-Reply-To: <8988b191-30cd-a9fe-1cd2-8625c671a7fe@intel.com>

On Tue, 3 Apr 2018 10:23:43 +0100
Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 3/29/2018 6:05 PM, Stephen Hemminger wrote:
> > This fixes some of the obvious warnings found building DPDK
> > with gcc-8. There still are some deeper issues in the rte_hash_table
> > code; leave the fix for that up to the maintainer.
> > 
> > Stephen Hemminger (2):
> >   rte_mbuf: fix strncpy warnings
> >   rte_metrics: fix strncpy truncation warning
> > 
> > v3
> >   missing SOB on 1st patch
> > 
> > v2
> >   fix issues with wrong length in mbuf pool_ops
> >   don't need memset in metrics names
> > 
> > Stephen Hemminger (2):
> >   rte_mbuf: fix strncpy warnings
> >   rte_metrics: fix strncpy truncation warning  
> 
> I tried with gcc-8 [1] and getting a few more build errors similar to these
> ones. Are these two files only build error you get?
> 
> 
> [1]
> gcc (GCC) 8.0.1 20180401 (experimental)
> 

This fixes the easy ones. The harder one is in cuckoo hash.

  CC rte_table_hash_cuckoo.o
lib/librte_table/rte_table_hash_cuckoo.c: In function ‘rte_table_hash_cuckoo_create’:
lib/librte_table/rte_table_hash_cuckoo.c:110:16: error: cast between incompatible function types from ‘rte_table_hash_op_hash’ {aka ‘long unsigned int (*)(void *, void *, unsigned int,  long unsigned int)’} to ‘uint32_t (*)(const void *, uint32_t,  uint32_t)’ {aka ‘unsigned int (*)(const void *, unsigned int,  unsigned int)’} [-Werror=cast-function-type]
   .hash_func = (rte_hash_function)(p->f_hash),
                ^
cc1: all warnings being treated as errors

Not sure what the right way to fix this one is. Hash table should not be defining
its own special hash function prototype. Changing to a common definition is
non-trivial and breaks ABI.  Casting seems wrong, error prone,
and a bad precedent in this case.

      reply	other threads:[~2018-04-03 15:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-29 17:05 Stephen Hemminger
2018-03-29 17:05 ` [dpdk-dev] [PATCH v3 1/2] rte_mbuf: fix strncpy warnings Stephen Hemminger
2018-04-04 15:35   ` Thomas Monjalon
2018-03-29 17:05 ` [dpdk-dev] [PATCH v3 2/2] rte_metrics: fix strncpy truncation warning Stephen Hemminger
2018-04-04 14:33   ` Thomas Monjalon
2018-04-03  9:23 ` [dpdk-dev] [PATCH v3 0/2] gcc-8 build fixes Ferruh Yigit
2018-04-03 15:10   ` Stephen Hemminger [this message]

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=20180403081036.4061b248@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.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).