From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tyo201.gate.nec.co.jp (TYO201.gate.nec.co.jp [210.143.35.51]) by dpdk.org (Postfix) with ESMTP id B254E58F5 for ; Fri, 28 Mar 2014 10:49:00 +0100 (CET) Received: from mailgate3.nec.co.jp ([10.7.69.195]) by tyo201.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id s2S9oVbw011237; Fri, 28 Mar 2014 18:50:31 +0900 (JST) Received: from mailsv.nec.co.jp (imss63.nec.co.jp [10.7.69.158]) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) with ESMTP id s2S9oVS01624; Fri, 28 Mar 2014 18:50:31 +0900 (JST) Received: from mail02.kamome.nec.co.jp (mail02.kamome.nec.co.jp [10.25.43.5]) by mailsv.nec.co.jp (8.13.8/8.13.4) with ESMTP id s2S9oVA2010993; Fri, 28 Mar 2014 18:50:31 +0900 (JST) Received: from bpxc99gp.gisp.nec.co.jp ([10.38.151.146] [10.38.151.146]) by mail03.kamome.nec.co.jp with ESMTP id BT-MMP-537302; Fri, 28 Mar 2014 18:49:57 +0900 Received: from BPXM14GP.gisp.nec.co.jp ([169.254.1.238]) by BPXC18GP.gisp.nec.co.jp ([10.38.151.146]) with mapi id 14.02.0328.011; Fri, 28 Mar 2014 18:49:57 +0900 From: Hiroshi Shimamoto To: Olivier MATZ Thread-Topic: [dpdk-dev] [memnic PATCH 1/5] pmd: fix race condition Thread-Index: AQHPSRKpBlSTOP6MSkCGPEqRYzFGrZr2QC6g Date: Fri, 28 Mar 2014 09:49:56 +0000 Message-ID: <7F861DC0615E0C47A872E6F3C5FCDDBD01093011@BPXM14GP.gisp.nec.co.jp> References: <7F861DC0615E0C47A872E6F3C5FCDDBD01073AD6@BPXM14GP.gisp.nec.co.jp> <533303E7.8050206@6wind.com> In-Reply-To: <533303E7.8050206@6wind.com> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.205.5.123] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" , Hayato Momma Subject: Re: [dpdk-dev] [memnic PATCH 1/5] pmd: fix race condition 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: Fri, 28 Mar 2014 09:49:01 -0000 Hi, > Subject: Re: [dpdk-dev] [memnic PATCH 1/5] pmd: fix race condition >=20 > Hi Hiroshi-san, >=20 > Please see my comments below. >=20 > On 03/11/2014 06:37 AM, Hiroshi Shimamoto wrote: > > From: Hiroshi Shimamoto > > > > There is a race condition, on transmit to vSwitch. >=20 > I think we should not talk specifically about vSwitch, as > another implementation of host memnic is possible. Maybe using > the term "host" is more appropriate? >=20 > > + if (idx !=3D ACCESS_ONCE(adapter->down_idx)) { > > + /* > > + * vSwitch freed this and got false positive, > > + * need to recover the status and retry. > > + */ > > + p->status =3D MEMNIC_PKT_ST_FREE; > > + goto retry; > > + } > > + >=20 > The patch indeed looks to improve reliability, even if it's > difficult to me to be sure that there is no other race condition. > Again, I would replace "vSwitch" by "host". okay, I'm fine with that. Do you want me resubmit update one? If so, will do next week. >=20 > By the way, I guess the Linux code in linux/memnic_net.c should be > modified in the same way. Hm, yes, we should check kernel driver too. thanks, Hiroshi >=20 > Regards, > Olivier