DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Sujith Sankar (ssujith)" <ssujith@cisco.com>
To: Pablo de Lara <pablo.de.lara.guarch@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 2/3] enic: use appropriate key length in hash table
Date: Fri, 4 Sep 2015 10:15:47 +0000	[thread overview]
Message-ID: <D20F6D26.43CAB%ssujith@cisco.com> (raw)
In-Reply-To: <1441357542-9820-3-git-send-email-pablo.de.lara.guarch@intel.com>


On 04/09/15 2:35 pm, "Pablo de Lara" <pablo.de.lara.guarch@intel.com>
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 <pablo.de.lara.guarch@intel.com>
>---
> 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,
>--

Looks good.

Thanks,
-Sujith


> 
>2.4.2
>

  reply	other threads:[~2015-09-04 10:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-04  9:05 [dpdk-dev] [PATCH 0/3] clean deprecated code in hash library Pablo de Lara
2015-09-04  9:05 ` [dpdk-dev] [PATCH 1/3] hash: use max key length as internal macro instead of deprecated one Pablo de Lara
2015-09-04  9:05 ` [dpdk-dev] [PATCH 2/3] enic: use appropriate key length in hash table Pablo de Lara
2015-09-04 10:15   ` Sujith Sankar (ssujith) [this message]
2015-09-04  9:05 ` [dpdk-dev] [PATCH 3/3] hash: remove deprecated functions and macros Pablo de Lara
2015-09-04 13:56 ` [dpdk-dev] [PATCH v2 0/3] clean deprecated code in hash library Thomas Monjalon
2015-09-04 13:56   ` [dpdk-dev] [PATCH v2 1/3] enic: use appropriate key length in hash table Thomas Monjalon
2015-09-04 13:56   ` [dpdk-dev] [PATCH v2 2/3] hash: remove deprecated function and macros Thomas Monjalon
2015-09-04 13:56   ` [dpdk-dev] [PATCH v2 3/3] version: 2.2.0-rc0 Thomas Monjalon
2015-09-07 13:28   ` [dpdk-dev] [PATCH v2 0/3] clean deprecated code in hash library Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D20F6D26.43CAB%ssujith@cisco.com \
    --to=ssujith@cisco.com \
    --cc=dev@dpdk.org \
    --cc=pablo.de.lara.guarch@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).