From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by dpdk.org (Postfix) with ESMTP id B085A5921 for ; Mon, 9 Nov 2015 23:21:58 +0100 (CET) Received: by padhx2 with SMTP id hx2so203716474pad.1 for ; Mon, 09 Nov 2015 14:21:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber_org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=5muy1dVFrLJEPjHWcpZ0XajifN/VtH2tzE6Edtz0u6w=; b=0CEuONvYduupXA30+gch9iZsi4RuuPkUJ4iRHlnroz66XB9TB8vIq1ctsc5bTqTj3K NboM8bb/NmaRE7W89xR7A+d9ASAFHWcCELZU9y3avEfvl+bvtyNiyhj2K5waT6wPc3V1 o6NN2uHnPklPAZllBASSsLCOGPdkqnYjF/AVcvTjxAejiBU7mFtr0gGjIpGWWH047ESy Kd4LCtdc5x+3pUoz1Mzqih04mBnOFKSONJUAy2ud5U1xf5PupnMoOkqWLvTU8/g2cVg6 ABbRxXdKz3/ASk2FGZsKXB8cmr2NYdpEgNvV9eCf4LdpkZp0ExCbsusexYSo7ZAG7nMx TI/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=5muy1dVFrLJEPjHWcpZ0XajifN/VtH2tzE6Edtz0u6w=; b=Do4bq4MwatgDiZCM2Xd1jIU2E8PNxtug1G+TGJHtA6StJ7IlP37yuDSbCLlnA3EqF4 0qGi6H9BQZZH8VR7ltj5b1SCVpATWnPrBnuKmXCYch1ayCOiwOZnV4HVtGL1XVg6yikS VsqNHMeWti2pHOZKsRqariQz/kukZjDGU15wpCavpT+teb+Q7yIwG6w4KYAjSCb77kke RRTzsF70SRlZX8m9V8jiNrjOtaYdIflBSucQ6AzrJFcqwBHemREQd9l3zakaJyzN8MOC qhe9K8kEB03BS+qCj5Oel1Iue0PJoXayiEwqKoNqsIf0iESqFXUMYyPzBc3wiuYEZw6r 993g== X-Gm-Message-State: ALoCoQmra9mTDG4a49v4fxqzNx6k+zGBCxDrMboCGIWoSQR8Djj88hWB0+noYgi79H/JmUNyBu6Y X-Received: by 10.68.98.97 with SMTP id eh1mr426223pbb.128.1447107717911; Mon, 09 Nov 2015 14:21:57 -0800 (PST) Received: from xeon-e3 (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id vg7sm146755pbc.2.2015.11.09.14.21.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Nov 2015 14:21:57 -0800 (PST) Date: Mon, 9 Nov 2015 14:22:05 -0800 From: Stephen Hemminger To: Tetsuya Mukawa Message-ID: <20151109142205.4040ec07@xeon-e3> In-Reply-To: <1447046221-20811-3-git-send-email-mukawa@igel.co.jp> References: <1446436737-25606-2-git-send-email-mukawa@igel.co.jp> <1447046221-20811-1-git-send-email-mukawa@igel.co.jp> <1447046221-20811-3-git-send-email-mukawa@igel.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, ann.zhuangyanying@huawei.com Subject: Re: [dpdk-dev] [PATCH v3 2/2] vhost: Add VHOST PMD 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: Mon, 09 Nov 2015 22:21:59 -0000 On Mon, 9 Nov 2015 14:17:01 +0900 Tetsuya Mukawa wrote: > + rte_atomic32_set(&r->while_queuing, 1); > + > + if (unlikely(rte_atomic32_read(&r->allow_queuing) == 0)) > + goto out; You special 2 variable custom locking here is buggy. If you hit second atomic test, you will leave while_queuing set.