From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 591E88D88 for ; Fri, 4 Sep 2015 11:05:46 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 04 Sep 2015 02:05:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,468,1437462000"; d="scan'208";a="782533500" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 04 Sep 2015 02:05:44 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t8495h4E007441; Fri, 4 Sep 2015 10:05:43 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id t8495hFK009870; Fri, 4 Sep 2015 10:05:43 +0100 Received: (from pdelarax@localhost) by sivswdev02.ir.intel.com with id t8495hWM009866; Fri, 4 Sep 2015 10:05:43 +0100 From: Pablo de Lara To: dev@dpdk.org Date: Fri, 4 Sep 2015 10:05:41 +0100 Message-Id: <1441357542-9820-3-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1441357542-9820-1-git-send-email-pablo.de.lara.guarch@intel.com> References: <1441357542-9820-1-git-send-email-pablo.de.lara.guarch@intel.com> Subject: [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 09:05:46 -0000 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++; } - pos = rte_hash_add_key(enic->fdir.hash, (void *)key); + pos = rte_hash_add_key(enic->fdir.hash, params); enic->fdir.nodes[pos] = key; return 0; } @@ -244,7 +244,7 @@ int enic_clsf_init(struct enic *enic) struct rte_hash_parameters hash_params = { .name = "enicpmd_clsf_hash", .entries = ENICPMD_CLSF_HASH_ENTRIES, - .key_len = RTE_HASH_KEY_LENGTH_MAX, + .key_len = sizeof(struct rte_eth_fdir_filter), .hash_func = DEFAULT_HASH_FUNC, .hash_func_init_val = 0, .socket_id = SOCKET_0, -- 2.4.2