From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3 0/4] fix creation of duplicate lpm and hash Date: Tue, 05 Apr 2016 17:51:44 +0200 Message-ID: <15207929.XBegjfGF8M@xps13> References: <1459841759-23296-1-git-send-email-olivier.matz@6wind.com> <1459857229-9814-1-git-send-email-olivier.matz@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Olivier Matz To: bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com Return-path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 182262C10 for ; Tue, 5 Apr 2016 17:53:23 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id f198so38086206wme.0 for ; Tue, 05 Apr 2016 08:53:23 -0700 (PDT) In-Reply-To: <1459857229-9814-1-git-send-email-olivier.matz@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-04-05 13:53, Olivier Matz: > Seen while trying to fix the func_reentrancy autotest. The > series addresses several issues: > > 1/ Hash and lpm return a pointer to an existing object if the user requests the > creation with an already existing name. This look dangerous: when an object > is returned, the user does not know if it should be freed or not. > > 2/ There is a race condition in cuckoo_hash as the lock is not held in > rte_hash_create(). We could find some cases where NULL is returned when the > object already exists (ex: when rte_ring_create() fails). > > 3/ There is a race condition func_reentrancy that can fail even if the tested > API behaves correctly. Pablo, Bruce, What do you think of these fixes for 16.04?