From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sujith Sankar (ssujith)" Subject: Re: [PATCH 2/3] enic: use appropriate key length in hash table Date: Fri, 4 Sep 2015 10:15:47 +0000 Message-ID: References: <1441357542-9820-1-git-send-email-pablo.de.lara.guarch@intel.com> <1441357542-9820-3-git-send-email-pablo.de.lara.guarch@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable To: Pablo de Lara , "dev@dpdk.org" Return-path: Received: from rcdn-iport-4.cisco.com (rcdn-iport-4.cisco.com [173.37.86.75]) by dpdk.org (Postfix) with ESMTP id 06E048D87 for ; Fri, 4 Sep 2015 12:15:49 +0200 (CEST) In-Reply-To: <1441357542-9820-3-git-send-email-pablo.de.lara.guarch@intel.com> Content-Language: en-US Content-ID: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 04/09/15 2:35 pm, "Pablo de Lara" wrote: >RTE_HASH_KEY_LENGTH_MAX was deprecated, and the hash table >actually is hosting bigger keys than that size, so key length >has been increased to properly allocate all keys. > >Signed-off-by: Pablo de Lara >--- > drivers/net/enic/enic_clsf.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/drivers/net/enic/enic_clsf.c b/drivers/net/enic/enic_clsf.c >index 9c2abfb..656b25b 100644 >--- a/drivers/net/enic/enic_clsf.c >+++ b/drivers/net/enic/enic_clsf.c >@@ -214,7 +214,7 @@ int enic_fdir_add_fltr(struct enic *enic, struct >rte_eth_fdir_filter *params) > enic->fdir.stats.add++; > } >=20 >- pos =3D rte_hash_add_key(enic->fdir.hash, (void *)key); >+ pos =3D rte_hash_add_key(enic->fdir.hash, params); > enic->fdir.nodes[pos] =3D key; > return 0; > } >@@ -244,7 +244,7 @@ int enic_clsf_init(struct enic *enic) > struct rte_hash_parameters hash_params =3D { > .name =3D "enicpmd_clsf_hash", > .entries =3D ENICPMD_CLSF_HASH_ENTRIES, >- .key_len =3D RTE_HASH_KEY_LENGTH_MAX, >+ .key_len =3D sizeof(struct rte_eth_fdir_filter), > .hash_func =3D DEFAULT_HASH_FUNC, > .hash_func_init_val =3D 0, > .socket_id =3D SOCKET_0, >-- Looks good. Thanks, -Sujith >=20 >2.4.2 >