From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by dpdk.org (Postfix) with ESMTP id ABB738D38 for ; Fri, 4 Sep 2015 15:57:58 +0200 (CEST) Received: by wicfx3 with SMTP id fx3so18945585wic.0 for ; Fri, 04 Sep 2015 06:57:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vXeA6DJOGzmRnJb8T0N2TnW0squ6lUboFhWhmC8fQBs=; b=H5M4h3aQ3b1WAurPPZaS013jkPeI5YNpSxPcRJPD6Y1TeEEPu+QojHoAgQRTeu1S0a RaSKhQWxi32LlbF6wE/40POKc0nHWRNcNbnkCu2cgKw7Ekhdp3QJCxIFfG6lcZSx23wC 1lQ4/jDvC+i2lsd/rgb/m4M30GQA9dY4jXtvKuy7G+y50mcuPPKOM2tLumDpKLA2ypin qh4z9ndkVdklSLmn/ZZ45+NuI4FwaxjFS0q6yPbNW6FwkHhnitqPoaJPaJVt3sAON1Yk 8qK2LU7lfpSoVUGsRgzxxTfC6JKNoV18cLNsFz7+W89hIDISpIIQYbyvXt00R3uv6SzJ 9j/g== X-Gm-Message-State: ALoCoQlg0PTK1dish0LTJiMw7TAEfNICznCZDOYnTXm9ggcqsdGh6olHTSwETqBCYxkZxbjcOa7x X-Received: by 10.180.82.233 with SMTP id l9mr6738513wiy.71.1441375078488; Fri, 04 Sep 2015 06:57:58 -0700 (PDT) Received: from localhost.localdomain (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id h6sm4560873wiy.3.2015.09.04.06.57.57 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Sep 2015 06:57:57 -0700 (PDT) From: Thomas Monjalon To: pablo.de.lara.guarch@intel.com Date: Fri, 4 Sep 2015 15:56:38 +0200 Message-Id: <1441375000-11716-2-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.5.1 In-Reply-To: <1441375000-11716-1-git-send-email-thomas.monjalon@6wind.com> References: <1441357542-9820-1-git-send-email-pablo.de.lara.guarch@intel.com> <1441375000-11716-1-git-send-email-thomas.monjalon@6wind.com> Cc: dev@dpdk.org Subject: [dpdk-dev] [PATCH v2 1/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 13:57:58 -0000 From: Pablo de Lara 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 Acked-by: Sujith Sankar --- 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.5.1