From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1370; q=dns/txt; s=iport; t=1441361750; x=1442571350; h=from:to:subject:date:message-id:references:in-reply-to: content-id:content-transfer-encoding:mime-version; bh=zblN5ccyha/FJK8LLwyWBz/J8p4lDzmelZUtzcAZyX4=; b=IG/WxTm4AIwwbIUK//NFXt/5wEzOxMhvZuA7S7yaM6RPMjxgJ4gmGXjC icsa4cou8MFEsVjS93fKKs70qr89lffZGTsSaIQnXHObrM7t9gvF6hgqp y/9XnNU3tajwPeGcDvxbRZKqczGpmTTTHjHnR0z0jjn+mesyh/iog8B01 M=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0D7BACKbulV/5NdJa1dgyGBPQa9WYdyAoE6OhIBAQEBAQEBgQqEJAEBBCcTTwIBCDYQMiUCBAESiC7KWAEBAQEBAQEDAQEBAQEBARuLboUShCwBBIx3hTqDIAGMdppwJoIPARyBVHEBAYhEgQUBAQE X-IronPort-AV: E=Sophos;i="5.17,468,1437436800"; d="scan'208";a="26156145" Received: from rcdn-core-11.cisco.com ([173.37.93.147]) by rcdn-iport-4.cisco.com with ESMTP; 04 Sep 2015 10:15:49 +0000 Received: from XCH-RCD-018.cisco.com (xch-rcd-018.cisco.com [173.37.102.28]) by rcdn-core-11.cisco.com (8.14.5/8.14.5) with ESMTP id t84AFmk9012485 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Fri, 4 Sep 2015 10:15:48 GMT Received: from xch-rcd-018.cisco.com (173.37.102.28) by XCH-RCD-018.cisco.com (173.37.102.28) with Microsoft SMTP Server (TLS) id 15.0.1104.5; Fri, 4 Sep 2015 05:15:47 -0500 Received: from xhc-aln-x10.cisco.com (173.36.12.84) by xch-rcd-018.cisco.com (173.37.102.28) with Microsoft SMTP Server (TLS) id 15.0.1104.5 via Frontend Transport; Fri, 4 Sep 2015 05:15:47 -0500 Received: from xmb-aln-x07.cisco.com ([169.254.2.62]) by xhc-aln-x10.cisco.com ([173.36.12.84]) with mapi id 14.03.0248.002; Fri, 4 Sep 2015 05:15:48 -0500 From: "Sujith Sankar (ssujith)" To: Pablo de Lara , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 2/3] enic: use appropriate key length in hash table Thread-Index: AQHQ5vqqbsjxK3uLs0uI6uzcACyYJw== 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> In-Reply-To: <1441357542-9820-3-git-send-email-pablo.de.lara.guarch@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.9.131030 x-originating-ip: [173.36.7.29] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 2/3] enic: use appropriate key length in hash table X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2015 10:15:50 -0000 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 >