From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 8794E2E81 for ; Wed, 26 Nov 2014 22:18:46 +0100 (CET) Received: by mail-wg0-f54.google.com with SMTP id l2so4846851wgh.13 for ; Wed, 26 Nov 2014 13:18:46 -0800 (PST) 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:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=HVOkCfMdrh3AiEDxGwmJCjiVSCK+OmQN/E2O9VZ8Bn8=; b=T0Qx5EhYt8/y7YdHdir5JuS0Yl73axLQukWtCZNj6pNhhdtIa0Y2no9OwMdPWkSpnp ci4mHwMwyJ6rPPBB52Kmcw5PjxXuke4lzy8LBJBhyyJp0oHPrEixE94vE2+/NrDTN6xu k8UcObOO55Wo/jvtUu0c6CtnFcycq8/42foZTWytBp/nR2Bn7c+8VqzaJIvq1X4fSCDo yaouPSXN6zKQLPu2LZlAERW7xcfLQmY1CW536eadRkhpqeWHT9FNEfRkUQOZ6Jc9c58r WylC88Lg6FQE2YBLQ+BXfpIqluA0OpDC5eMTd28C4FMDmXXI8eEN63gH01bTP+rE1G7w V9RQ== X-Gm-Message-State: ALoCoQnrdFN+B5HmZhg+YMk3o1O3gV7FffwVWf8GWO+WXj+8lygou/zf06d/8pjSNB3Y4iPmRaRS X-Received: by 10.180.99.163 with SMTP id er3mr44273515wib.18.1417036726366; Wed, 26 Nov 2014 13:18:46 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id q4sm1168754wjo.46.2014.11.26.13.18.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Nov 2014 13:18:45 -0800 (PST) From: Thomas Monjalon To: Takayuki Usui , cristian.dumitrescu@intel.com Date: Wed, 26 Nov 2014 22:18:22 +0100 Message-ID: <2469278.NhId8OL9C5@xps13> Organization: 6WIND User-Agent: KMail/4.14.2 (Linux/3.17.2-1-ARCH; KDE/4.14.2; x86_64; ; ) In-Reply-To: <1407728582-19637-1-git-send-email-takayuki@midokura.com> References: <1407728582-19637-1-git-send-email-takayuki@midokura.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 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: Wed, 26 Nov 2014 21:18:46 -0000 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