DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Takayuki Usui <takayuki@midokura.com>, cristian.dumitrescu@intel.com
Cc: dev@dpdk.org, balazs.nemeth@intel.com
Subject: Re: [dpdk-dev] [PATCH] table: hash: fix entry size of configurable key size ext and lru
Date: Wed, 26 Nov 2014 22:18:22 +0100	[thread overview]
Message-ID: <2469278.NhId8OL9C5@xps13> (raw)
In-Reply-To: <1407728582-19637-1-git-send-email-takayuki@midokura.com>

Hi,

2014-08-11 12:43, Takayuki Usui:
> Signed-off-by: Takayuki Usui <takayuki@midokura.com>
> ---
>  lib/librte_table/rte_table_hash_ext.c | 2 +-
>  lib/librte_table/rte_table_hash_lru.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/librte_table/rte_table_hash_ext.c b/lib/librte_table/rte_table_hash_ext.c
> index 6e26d98..8b86fab 100644
> --- a/lib/librte_table/rte_table_hash_ext.c
> +++ b/lib/librte_table/rte_table_hash_ext.c
> @@ -221,7 +221,7 @@ rte_table_hash_ext_create(void *params, int socket_id, uint32_t entry_size)
>  	/* Internal */
>  	t->bucket_mask = t->n_buckets - 1;
>  	t->key_size_shl = __builtin_ctzl(p->key_size);
> -	t->data_size_shl = __builtin_ctzl(p->key_size);
> +	t->data_size_shl = __builtin_ctzl(entry_size);
>  
>  	/* Tables */
>  	table_meta_offset = 0;
> diff --git a/lib/librte_table/rte_table_hash_lru.c b/lib/librte_table/rte_table_hash_lru.c
> index d1a4984..bf92e81 100644
> --- a/lib/librte_table/rte_table_hash_lru.c
> +++ b/lib/librte_table/rte_table_hash_lru.c
> @@ -192,7 +192,7 @@ rte_table_hash_lru_create(void *params, int socket_id, uint32_t entry_size)
>  	/* Internal */
>  	t->bucket_mask = t->n_buckets - 1;
>  	t->key_size_shl = __builtin_ctzl(p->key_size);
> -	t->data_size_shl = __builtin_ctzl(p->key_size);
> +	t->data_size_shl = __builtin_ctzl(entry_size);
>  
>  	/* Tables */
>  	table_meta_offset = 0;

A similar patch has been recently applied:
	http://dpdk.org/browse/dpdk/commit/?id=8595428e50

Cristian, as the author of this library, it would be appreciated that you
review and ack such patch. It's important to accept contributions and give
credit to the first author of a patch.

Thanks
-- 
Thomas

  reply	other threads:[~2014-11-26 21:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-11  3:43 Takayuki Usui
2014-11-26 21:18 ` Thomas Monjalon [this message]
2014-11-27 10:34   ` Dumitrescu, Cristian
2014-11-27 10:38   ` Dumitrescu, Cristian

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=2469278.NhId8OL9C5@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=balazs.nemeth@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=takayuki@midokura.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).