From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] table: hash: fix entry size of configurable key size ext and lru Date: Wed, 26 Nov 2014 22:18:22 +0100 Message-ID: <2469278.NhId8OL9C5@xps13> References: <1407728582-19637-1-git-send-email-takayuki@midokura.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org, balazs.nemeth-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org To: Takayuki Usui , cristian.dumitrescu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org Return-path: In-Reply-To: <1407728582-19637-1-git-send-email-takayuki-SN072n759w5Wk0Htik3J/w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Hi, 2014-08-11 12:43, Takayuki Usui: > Signed-off-by: Takayuki Usui > --- > 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