From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] hash: fix incorrect eviction counter Date: Sat, 07 Oct 2017 00:10:36 +0200 Message-ID: <2186124.KRdBs8CKvy@xps> References: <20170921124646.68253-1-pablo.de.lara.guarch@intel.com> <20170922042543.38362-1-pablo.de.lara.guarch@intel.com> <20170922134637.GA21280@bricha3-MOBL3.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Bruce Richardson , stable@dpdk.org To: Pablo de Lara Return-path: In-Reply-To: <20170922134637.GA21280@bricha3-MOBL3.ger.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 22/09/2017 15:46, Bruce Richardson: > On Fri, Sep 22, 2017 at 05:25:43AM +0100, Pablo de Lara wrote: > > When adding a new entry in a hash table, there is > > a maximum number of evictions that can be > > performed. When the counter of these evictions reaches > > this maximum, the entry cannot be added, as it is considered > > that the algorithm has encountered an infinite loop. > > > > The problem with the current implementation, is that this > > counter was declared as a static variable. > > If there are multiple threads adding entries in the same table > > or in different tables, they should access different counters, > > one per core and per table. > > > > Therefore, the variable has been modified to be non-static. > > > > Fixes: 243e93a5046f ("hash: fix unlimited cuckoo path") > > Cc: stable@dpdk.org > > > > Signed-off-by: Pablo de Lara > > --- > Acked-by: Bruce Richardson Applied, thanks