From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=vSqZOw2mpBmSoTr1XVFhLDzw/aLwau46ZM+40EzpLiw=; b=MdasgtSg8T2IVb+3fxFX+nZ9LGjhBNtFR2moqFlp57AswSRizbRmvVbJiNMchKslt6 EF8Mo+HfpxgpRsJs78ygGezOA/8myfOodu/LQu2cOhKcfUeJzwRgWDUYJp25e96H+CaE VsUG8ju25R9hqiftC7bO3NullMeNxmBaK+SMoXqG0HyRNAhnOBGoH/VPQ6NPIZx20Oxj BW4LGTlT6fk3IN8oVBxatdPUUd9ThQHWShrtZwXDqEHJQ/Gmq72rrG4fGCFFiw+nGn+S NmOicNJlIGTa4dRq93/mxjSETGlDTlLggnG93gUEfcjsJTMXNq0kpiBw3hFi9uGC1bTA Lh0w== 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; bh=vSqZOw2mpBmSoTr1XVFhLDzw/aLwau46ZM+40EzpLiw=; b=l/9xwNRZuhmd6+Fc8ouOZokYnTzudY3OZ3sEco8o9Rl0qO8r24Sont9insFtrvRYsb 89QKdPwdwOrCUJbEiTe+X0KMDXwAjA+L6GIgkh14WKZD9GnFAhploK6liId5AZrYh3ET DCIsx1IDX5taZATsLNjBTXwKwxCQg2vY6v1CtaIlDhEEOmkuHeZLI5C/BNJKm3Q4ZP6k C4NOz2Wv8id0a0SowxmzNPsMT1XuUSs0B9Xi8AvpTQe1R/hoKVQsc51SgF3fPKziP0pu U+Kh/RkRRtAtg53idHIeAFcfVy4vk76rkGTDY2TtuBbHjabg5GdJSSIli4TE7pzgYzhO xaBg== X-Gm-Message-State: AD7BkJLszH1ClywLRYwUlWSKvGjl7HcAohec+/igRVir29kcSnoPRR/f5YXNZg5Ji6Z/Z9AI X-Received: by 10.28.47.143 with SMTP id v137mr19014997wmv.49.1459871602839; Tue, 05 Apr 2016 08:53:22 -0700 (PDT) Received: from xps13.localnet (91.111.75.86.rev.sfr.net. [86.75.111.91]) by smtp.gmail.com with ESMTPSA id cb2sm35374754wjc.16.2016.04.05.08.53.21 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Apr 2016 08:53:22 -0700 (PDT) From: Thomas Monjalon To: bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com Cc: dev@dpdk.org, Olivier Matz Date: Tue, 05 Apr 2016 17:51:44 +0200 Message-ID: <15207929.XBegjfGF8M@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1459857229-9814-1-git-send-email-olivier.matz@6wind.com> 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-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3 0/4] fix creation of duplicate lpm and hash 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: Tue, 05 Apr 2016 15:53:23 -0000 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?