From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: DPDK build issues with gcc-8 Date: Mon, 19 Mar 2018 10:50:47 -0700 Message-ID: <20180319105047.37b30e50@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable To: dev@dpdk.org, guruprasadx.rao@intel.com Return-path: Received: from mail-pf0-f179.google.com (mail-pf0-f179.google.com [209.85.192.179]) by dpdk.org (Postfix) with ESMTP id 9E0B35F18 for ; Mon, 19 Mar 2018 18:50:50 +0100 (CET) Received: by mail-pf0-f179.google.com with SMTP id y186so7322981pfb.2 for ; Mon, 19 Mar 2018 10:50:50 -0700 (PDT) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Tried building DPDK with gcc-8 and got several new warnings. Working on trivial patches for most of them, but the DPDK rte_table interfa= ce for hashing has a more fundamental problem which Gcc-8 discovers. The code is trying to cast an RTE hash function into a RTE table hash funct= ion with a different signature. It works because the two are mostly the same, = but it really shouldn't be done that way: Warning: CC rte_table_hash_cuckoo.o lib/librte_table/rte_table_hash_cuckoo.c: In function =E2=80=98rte_table_ha= sh_cuckoo_create=E2=80=99: lib/librte_table/rte_table_hash_cuckoo.c:110:16: error: cast between incomp= atible function types from =E2=80=98rte_table_hash_op_hash=E2=80=99 {aka = =E2=80=98long unsigned int (*)(void *, void *, unsigned int, long unsigned= int)=E2=80=99} to =E2=80=98uint32_t (*)(const void *, uint32_t, uint32_t)= =E2=80=99 {aka =E2=80=98unsigned int (*)(const void *, unsigned int, unsig= ned int)=E2=80=99} [-Werror=3Dcast-function-type] .hash_func =3D (rte_hash_function)(p->f_hash), ^ RTE hash: /** Type of function that can be used for calculating the hash value. */ typedef uint32_t (*rte_hash_function)(const void *key, uint32_t key_len, uint32_t init_val); RTE table hash: /** Hash function */ typedef uint64_t (*rte_table_hash_op_hash)( void *key, void *key_mask, uint32_t key_size, uint64_t seed); Just turning off the warning is not an acceptable solution. The API should = really be fixed. My preference would be to eliminate rte_table_hash_op_hash typedef and keep rte_hash_function.