From: Pablo de Lara Date: Fri, 4 Sep 2015 09:05:41 +0000 (+0100) Subject: enic: use appropriate key length in hash table X-Git-Tag: spdx-start~8491 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2b9c06e78b3ef2059053c831ba7b533fa749e231;p=dpdk.git enic: use appropriate key length in hash table 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 --- diff --git a/drivers/net/enic/enic_clsf.c b/drivers/net/enic/enic_clsf.c index 9c2abfb441..656b25bccf 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,