From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <cristian.dumitrescu@intel.com>
Received: from mga11.intel.com (mga11.intel.com [192.55.52.93])
 by dpdk.org (Postfix) with ESMTP id 482D01B7F6
 for <dev@dpdk.org>; Mon,  9 Apr 2018 15:00:15 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from fmsmga008.fm.intel.com ([10.253.24.58])
 by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 09 Apr 2018 05:59:07 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.48,427,1517904000"; d="scan'208";a="31284234"
Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25])
 by fmsmga008.fm.intel.com with ESMTP; 09 Apr 2018 05:59:07 -0700
Received: from irsmsx108.ger.corp.intel.com ([169.254.11.155]) by
 irsmsx110.ger.corp.intel.com ([169.254.15.211]) with mapi id 14.03.0319.002;
 Mon, 9 Apr 2018 13:59:06 +0100
From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: "Singh, Jasvinder" <jasvinder.singh@intel.com>, "dev@dpdk.org"
 <dev@dpdk.org>
Thread-Topic: [PATCH] table: fix build error with gcc 8
Thread-Index: AQHT0AFDvYx2RPzVvkK3GozvP95nyKP4ZQnw
Date: Mon, 9 Apr 2018 12:59:05 +0000
Message-ID: <3EB4FA525960D640B5BDFFD6A3D891267BB3CF37@IRSMSX108.ger.corp.intel.com>
References: <20180409124948.130974-1-jasvinder.singh@intel.com>
In-Reply-To: <20180409124948.130974-1-jasvinder.singh@intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
dlp-product: dlpe-windows
dlp-version: 11.0.200.100
dlp-reaction: no-action
x-originating-ip: [163.33.239.180]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH] table: fix build error with gcc 8
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 09 Apr 2018 13:00:16 -0000



> -----Original Message-----
> From: Singh, Jasvinder
> Sent: Monday, April 9, 2018 1:50 PM
> To: dev@dpdk.org
> Cc: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Subject: [PATCH] table: fix build error with gcc 8
>=20
> Fix build error with gcc 8.0 due to cast between function types.
> Fixes: 5a80bf0ae613 ("table: add cuckoo hash")
>=20
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> ---
>  lib/librte_table/rte_table_hash_cuckoo.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>=20
> diff --git a/lib/librte_table/rte_table_hash_cuckoo.c
> b/lib/librte_table/rte_table_hash_cuckoo.c
> index dcb4fe9..f7eae27 100644
> --- a/lib/librte_table/rte_table_hash_cuckoo.c
> +++ b/lib/librte_table/rte_table_hash_cuckoo.c
> @@ -103,11 +103,13 @@ rte_table_hash_cuckoo_create(void *params,
>  		return NULL;
>  	}
>=20
> +	void *hash_func =3D p->f_hash;
> +
>  	/* Create cuckoo hash table */
>  	struct rte_hash_parameters hash_cuckoo_params =3D {
>  		.entries =3D p->n_keys,
>  		.key_len =3D p->key_size,
> -		.hash_func =3D (rte_hash_function)(p->f_hash),
> +		.hash_func =3D (rte_hash_function) hash_func,
>  		.hash_func_init_val =3D p->seed,
>  		.socket_id =3D socket_id,
>  		.name =3D p->name
> --
> 2.9.3

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>