From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 387E6ADCC for ; Wed, 15 Jun 2016 07:30:14 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 14 Jun 2016 22:30:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,474,1459839600"; d="scan'208";a="997880665" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by orsmga002.jf.intel.com with ESMTP; 14 Jun 2016 22:30:12 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.193]) by IRSMSX154.ger.corp.intel.com ([169.254.12.28]) with mapi id 14.03.0248.002; Wed, 15 Jun 2016 06:30:11 +0100 From: "Pattan, Reshma" To: Thomas Monjalon CC: "dev@dpdk.org" , "Ananyev, Konstantin" Thread-Topic: [dpdk-dev] [PATCH v9 1/8] ethdev: use locks to protect Rx/Tx callback lists Thread-Index: AQHRxiCOCicDEeu1BEq9TkhPkW+2Mp/pUZ+AgACthBA= Date: Wed, 15 Jun 2016 05:30:10 +0000 Message-ID: <3AEA2BF9852C6F48A459DA490692831F0104E1EE@IRSMSX109.ger.corp.intel.com> References: <1465575534-23605-1-git-send-email-reshma.pattan@intel.com> <1465897108-26548-1-git-send-email-reshma.pattan@intel.com> <1465897108-26548-2-git-send-email-reshma.pattan@intel.com> <12886124.K2biJ8F8kE@xps13> In-Reply-To: <12886124.K2biJ8F8kE@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmY4OTU3YjctMjNlOC00ZTQzLWIwZTctYjliZGE2NTdkYjM2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ik1QY1ZXTkxqWHVMbzlRUVMyV205SndVT0ZYUlpLRDFBNVwvQjBYdVhjMUpjPSJ9 x-ctpclassification: CTP_IC 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] [PATCH v9 1/8] ethdev: use locks to protect Rx/Tx callback lists 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, 15 Jun 2016 05:30:14 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Tuesday, June 14, 2016 9:00 PM > To: Pattan, Reshma > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v9 1/8] ethdev: use locks to protect Rx/Tx > callback lists >=20 > 2016-06-14 10:38, Reshma Pattan: > > Added spinlocks around add/remove logic of Rx and Tx callbacks to > > avoid corruption of callback lists in multithreaded context. > > > > Signed-off-by: Reshma Pattan >=20 > Why cb->next is not locked in burst functions? It is safe to do "read access" here and doesn't require any locking as rx/t= x burst is initiated by only local user(control plane) thread. > Just protecting add/remove but not its usage seems useless. Here locks were required around add/remove to protect "write access" beca= use write to callback list is now done from 2 threads=20 i.e. one from local user thread(control plane) and another from pdump contr= ol thread(initiated by remote pdump request).=20 Thanks, Reshma