From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 977B7DE0 for ; Wed, 10 Dec 2014 16:53:58 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 10 Dec 2014 07:53:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="427387425" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by FMSMGA003.fm.intel.com with ESMTP; 10 Dec 2014 07:43:10 -0800 Received: from irsmsx107.ger.corp.intel.com ([169.254.10.190]) by IRSMSX152.ger.corp.intel.com ([169.254.6.56]) with mapi id 14.03.0195.001; Wed, 10 Dec 2014 15:53:52 +0000 From: "Mrzyglod, DanielX T" To: "dev@dpdk.org" Thread-Topic: [dpdk-dev] Added Spinlock to l3fwd-vf example to prevent race conditioning Thread-Index: AQHQEvXO2fJqynX8P0ONnxz6nzmI7ZyIfRpAgABtfoCAAAICAIAADhLw Date: Wed, 10 Dec 2014 15:53:52 +0000 Message-ID: <7ADD74816B4C8A45B56203CBA65FE5A6097CABC3@IRSMSX107.ger.corp.intel.com> References: <1404818184-29388-1-git-send-email-danielx.t.mrzyglod@intel.com> <20141208144545.GD3237@localhost.localdomain> <20141210144745.GC17040@localhost.localdomain> <20141210145455.GC1632@bricha3-MOBL3> In-Reply-To: <20141210145455.GC1632@bricha3-MOBL3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] Added Spinlock to l3fwd-vf example to prevent race conditioning 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, 10 Dec 2014 15:53:59 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson > Sent: Wednesday, December 10, 2014 3:55 PM > To: Neil Horman > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] Added Spinlock to l3fwd-vf example to prevent rac= e > conditioning >=20 > On Wed, Dec 10, 2014 at 09:47:45AM -0500, Neil Horman wrote: > > On Wed, Dec 10, 2014 at 08:18:36AM +0000, Wodkowski, PawelX wrote: > > > > Though, that said, doesn't it seem to anyone else like serializatio= n of > enqueue > > > > to a port should be the responsibility of the library, not the appl= ication? > > > > > > > > Neil > > > > > > From my knowledge it is an application responsibility to serialize a= ccess to > > > queue on particular port. > > > > > I understand thats the way it currently is, I'm advocating for the fact= that it > > should not be. > > Neil > > > It could be done, but I think we'd need to add a new API (or new paramete= r to > existing API) to do so, as the cost of adding the locks would be severe, = even in > the uncontented case. > This is why it hasn't been done up till now, obviously enough. In general= , where > we don't provide performant multi-thread safe APIs, we generally don't tr= y and > provide versions with locks, we just document the limitation and then lea= ve it > up to the app to determine how best to handle things. >=20 > /Bruce the problem is when the routing is through the same queue the app crashed.= =20 example: traffic to 1.1.1.1 from port 0 and 1.1.1.1 from port 1. You all are right :) So the only solution are spinlocks, or we must modify=20 intel-dpdk-sample-applications-user-guide.pdf to inform users about limitat= ions.