From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by dpdk.org (Postfix) with ESMTP id E24211B81B for ; Mon, 9 Apr 2018 17:09:40 +0200 (CEST) Received: by mail-pg0-f67.google.com with SMTP id t140so365422pgb.1 for ; Mon, 09 Apr 2018 08:09:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VGqDOEiWXl8gF3ZLiChN2xyqKmt9DL8R3XMHvfJWgUU=; b=yTCCzRfYNf1AdM/79ABnQITGeJJry451bZVBlHrwR+xk6/xVM715gJTx220oZwDO+m xASa4142Un8twUR0Xxn1CgGASmKjlDOQ1aBCFcGTx7KaOvLm3tjkBR78V8iloaZ5iDtV DWogEBu5RBDU6Pr4IcwoUfzPIdcqGDJQrqBqTbzTEQuqmDyedDNfVTDxyPfi6PuAb0Fi y4y8bOTaFgEV32AU7fk58sORiHeB1dpK3hlEtiHNrfeI6ifQfziCLttajlde4NP6mLXz 6BZjNvO4WIdmoWG/GvFHpzKZWrKmkBCMFHByLYIgwaEEX8jxJqqT6GCxMACoNeGjuAHF CCgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VGqDOEiWXl8gF3ZLiChN2xyqKmt9DL8R3XMHvfJWgUU=; b=Jfx4hbesU+qU+CrNwpOb05a7lugxAF9bi8LS4I/mhV6+V0W+XpC5jX7FgZuYROt8+C wKEiY8/eLfFtUqFzCub48ZhG6fsznVO+0Zsb6uR5HALgYupNrGeD/QkGOthEFVqvOqst YUJzh2rjAbDgtgOt8VOpd69El8oNi/WQ0vfp9GGgCsyWC3/d3V/RobaayT6jAY0omltP opXe8PU8rbrAriUMXRaRxJBHfAxgCML6xcUhDGInamCEUbp5oeRA0y0zPydDfE/RTqyG ksCLoSU87wj22CJeWcHhtN6X7r1UPytGMBeAMFTChhYTINadBxs+DSzyI6uMUP9hFE2Z vqwQ== X-Gm-Message-State: AElRT7EcoQTWUlL+Sdom7Vbm3ibnuebw4Nqq9+reDdZy76hUmjC7dtso a4vjr1AlmFaNK4IQHQ7urJiHWmwH7b4= X-Google-Smtp-Source: AIpwx49HXR7gKIGfdnnODVfJ2vZnoHJJwPTBs3z2khyE2QVpt+3uL9X5qSD/D9uOIFEqwI44gvdRsA== X-Received: by 10.98.72.205 with SMTP id q74mr29670630pfi.70.1523286580105; Mon, 09 Apr 2018 08:09:40 -0700 (PDT) Received: from xeon-e3 (204-195-71-95.wavecable.com. [204.195.71.95]) by smtp.gmail.com with ESMTPSA id x29sm1825005pfk.68.2018.04.09.08.09.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Apr 2018 08:09:40 -0700 (PDT) Date: Mon, 9 Apr 2018 08:09:36 -0700 From: Stephen Hemminger To: Jasvinder Singh Cc: dev@dpdk.org, cristian.dumitrescu@intel.com Message-ID: <20180409080936.58ecb66c@xeon-e3> In-Reply-To: <20180409124948.130974-1-jasvinder.singh@intel.com> References: <20180409124948.130974-1-jasvinder.singh@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Apr 2018 15:09:41 -0000 On Mon, 9 Apr 2018 13:49:48 +0100 Jasvinder Singh wrote: > Fix build error with gcc 8.0 due to cast between function types. > Fixes: 5a80bf0ae613 ("table: add cuckoo hash") > > Signed-off-by: Jasvinder Singh > --- > lib/librte_table/rte_table_hash_cuckoo.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > 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; > } > > + void *hash_func = p->f_hash; > + > /* Create cuckoo hash table */ > struct rte_hash_parameters hash_cuckoo_params = { > .entries = p->n_keys, > .key_len = p->key_size, > - .hash_func = (rte_hash_function)(p->f_hash), > + .hash_func = (rte_hash_function) hash_func, > .hash_func_init_val = p->seed, > .socket_id = socket_id, > .name = p->name This is just tricking the compiler into not complaining. I would really rather see the two hash functions made the same.