From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id E41082BFA for ; Wed, 6 Apr 2016 17:33:34 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id l6so70609050wml.1 for ; Wed, 06 Apr 2016 08:33:34 -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=b4PjxqDvvNQAKvd+bHAbxtIX4tNr2jwXpBqZVJrNZx4=; b=tf8smbHKZjd53O63DG4rQ6gakl4rGBv48yuZrRtvsw/R3ppgIZw1ZpnzwDmi/2bFix Uy/63Mo5VhG9OO9PkVAfd4WChHGqJJxEQtjvNHJzqwhBM8MxKrWN1HrCqApzK6UhEUmi wBDVzDbujw+tGVNYtKQtCy0My0/VpS8cthcbh010H555DTQ/IrO2w7ZWfpp9lGM3h8JO fTuPFcT2RVIex0iJvuV/30o+ZZCk8skbLbU6DUEJ8nEdMgQzsHUqQq6CWwHOge7NNd+s tnae247EQzQ0FjRxx00V6m16xkuhdplI0FDWN9o0ZivY8SLr26cuyY/p7u8b0oh+5wyE ey3A== 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=b4PjxqDvvNQAKvd+bHAbxtIX4tNr2jwXpBqZVJrNZx4=; b=mJpGOCYf/ymOUV1zyosAxdRWXwPLbi+mMl1w8hWKDV3cJUZAQFQ1Gli9HnfwhpaPCt +xWB5kmcOibVGWvUH0tya6ebVVeUjwhBTxYeuBE15szSuSZGyA5A2lhEl7WlUZyZ2vUh 2JAsOOhAZm8T+J5GC9HCgFk9gVSdyYJeNN+NVSc0b06AXIs+r6WCUmNnRb7+tEtUN1kd DcwmM/ld5HA6fctMLyXtd+6qJ9rgpESrHes8YMP1hecHis433kZeIrNt6mU37T3VLL2L pQ5aTFzVyd1kcIz449m1oNmnQUOX60NJisNLasixZf/aMnEPeYkz4A28Y/rIXxRZ0fFI fYJg== X-Gm-Message-State: AD7BkJI5YlsP3C7JjXqyCCrK7/+ZwkLLBxeVu16fndxQDK602fLxK2k7hUCRIg9L3kvttRRm X-Received: by 10.194.103.198 with SMTP id fy6mr20869547wjb.48.1459956814742; Wed, 06 Apr 2016 08:33:34 -0700 (PDT) Received: from xps13.localnet (91.111.75.86.rev.sfr.net. [86.75.111.91]) by smtp.gmail.com with ESMTPSA id 192sm4320478wmw.0.2016.04.06.08.33.33 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 06 Apr 2016 08:33:34 -0700 (PDT) From: Thomas Monjalon To: Olivier Matz Cc: dev@dpdk.org, bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com Date: Wed, 06 Apr 2016 17:31:56 +0200 Message-ID: <2006370.AW7BpQLGPu@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1459949281-26562-1-git-send-email-olivier.matz@6wind.com> References: <1459857229-9814-1-git-send-email-olivier.matz@6wind.com> <1459949281-26562-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 v4 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: Wed, 06 Apr 2016 15:33:35 -0000 2016-04-06 15:27, 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. Applied, thanks