From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id E2178A05DC for ; Mon, 10 Jun 2019 07:16:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0840A1BDF0; Mon, 10 Jun 2019 07:16:27 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 3139E1BDEE for ; Mon, 10 Jun 2019 07:16:25 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jun 2019 22:16:24 -0700 X-ExtLoop1: 1 Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga001.fm.intel.com with ESMTP; 09 Jun 2019 22:16:23 -0700 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 9 Jun 2019 22:16:23 -0700 Received: from bgsmsx155.gar.corp.intel.com (10.224.48.102) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 9 Jun 2019 22:16:23 -0700 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.109]) by BGSMSX155.gar.corp.intel.com ([169.254.12.33]) with mapi id 14.03.0415.000; Mon, 10 Jun 2019 10:46:19 +0530 From: "Varghese, Vipin" To: "Ananyev, Konstantin" , Stephen Hemminger CC: "olivier.matz@6wind.com" , "Pattan, Reshma" , "Wiles, Keith" , "dev@dpdk.org" , "Padubidri, Sanjay A" Thread-Topic: [dpdk-dev] [PATCH v1 1/2] lib/ring: add enqueue-dequeue callabck Thread-Index: AQHVHJZTSox6wG22SEqA+y7b3zcuwKaOrIWAgAD6PgCABLbFQA== Date: Mon, 10 Jun 2019 05:16:18 +0000 Message-ID: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D36605D@BGSMSX101.gar.corp.intel.com> References: <20190606183355.56734-1-vipin.varghese@intel.com> <20190606124927.1a369d5b@hermes.lan> <2601191342CEEE43887BDE71AB97725801688E19BF@IRSMSX104.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB97725801688E19BF@IRSMSX104.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzgxNTQxYTUtNThkZi00ZGZlLWE1NDUtNDJiMmZiNDUyNzY1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicDAxblMzYk1rOCtYcHJjK1FraWs0N010UWhcL3pMc1VqUTlLc0J1b2MySXhEajN3NFZOajlFZ2NHMEZrMUxQYU0ifQ== dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v1 1/2] lib/ring: add enqueue-dequeue callabck X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Ananyev, Konstantin > Sent: Friday, June 7, 2019 4:15 PM > To: Stephen Hemminger ; Varghese, Vipin > > Cc: olivier.matz@6wind.com; Pattan, Reshma ; > Wiles, Keith ; dev@dpdk.org; Padubidri, Sanjay A > > Subject: RE: [dpdk-dev] [PATCH v1 1/2] lib/ring: add enqueue-dequeue call= abck >=20 >=20 >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen Hemminger > > Sent: Thursday, June 6, 2019 8:49 PM > > To: Varghese, Vipin > > Cc: olivier.matz@6wind.com; Pattan, Reshma ; > > Wiles, Keith ; dev@dpdk.org; Padubidri, Sanjay > > A > > Subject: Re: [dpdk-dev] [PATCH v1 1/2] lib/ring: add enqueue-dequeue > > callabck > > > > On Fri, 7 Jun 2019 00:03:54 +0530 > > Vipin Varghese wrote: > > > > > Add callback event handler for enqueue dequeue operation on ring. > > > The pre-enqueue and post-dequeue operation on ring is selected to > > > invoke user callback handler. > > > > > > Signed-off-by: Vipin Varghese > > > --- > > > > NAK > > What is the use case for this? Rings are one of the most used elements > > of DPDK and anything like this will have performance impact. > > > > And as DPDK goes to more of distribution model, all features have to > > be enabled. >=20 > +1 here. I am not sure if I have the understanding correct,, so if all features are = to enabled 'why is features set as no in `common/config_base`'. > Approach in general looks quite expensive, most users wouldn't need it. > For those who want such functionality, it is not big deal to create a wra= pper on > top of current rte_ring (drivers/net/ring could be one example). Thanks, will explore and get back. > Konstantin >=20 > > > > > > Also, this looks like a problem: > > +struct rte_ring_callback { > > + TAILQ_ENTRY(rte_ring_callback) next; /* Callbacks list */ > > + rte_ring_cb_fn cb_fn; /* Callback address */ > > + void *cb_arg; /* Parameter for callback */ > > + uint32_t active; /* Callback is executing */ > > > > The active element is likely updated in one thread and queried in > > another it needs to be volatile, or better yet an atomic to ensure memo= ry > ordering. >=20 >=20