From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AFDFBA0487 for ; Thu, 4 Jul 2019 07:06:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9149D2C60; Thu, 4 Jul 2019 07:06:16 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 0106D2C52 for ; Thu, 4 Jul 2019 07:06:14 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jul 2019 22:06:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,449,1557212400"; d="scan'208";a="166173972" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga007.fm.intel.com with ESMTP; 03 Jul 2019 22:06:13 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 3 Jul 2019 22:06:13 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 3 Jul 2019 22:06:13 -0700 Received: from BGSMSX107.gar.corp.intel.com (10.223.4.191) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 3 Jul 2019 22:06:13 -0700 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.46]) by BGSMSX107.gar.corp.intel.com ([169.254.9.209]) with mapi id 14.03.0439.000; Thu, 4 Jul 2019 10:34:45 +0530 From: "Varghese, Vipin" To: Honnappa Nagarahalli , "olivier.matz@6wind.com" , "Pattan, Reshma" , "Wiles, Keith" , "dev@dpdk.org" CC: "Padubidri, Sanjay A" , nd , nd Thread-Topic: [dpdk-dev] [PATCH v1 1/2] lib/ring: add enqueue-dequeue callabck Thread-Index: AQHVHJZTSox6wG22SEqA+y7b3zcuwKaPWBoAgAUDn1CAASgcgIAkjuGw Date: Thu, 4 Jul 2019 05:04:45 +0000 Message-ID: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D38BA4B@BGSMSX101.gar.corp.intel.com> References: <20190606183355.56734-1-vipin.varghese@intel.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D366038@BGSMSX101.gar.corp.intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTNhMmVhNDUtODAyMC00ZjM3LWFiOWQtMTNjNzAwZGQ0MjMwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibFZFRENLYmRLaTErbTFYeEpRNjZidjBwUzlaWjdKUG94bjRJNVFDcWVsamNMZmhMYmRka3hQcktSQjkwRlQrSiJ9 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" Thanks Honnappa, will work on the changes suggested. > -----Original Message----- > From: Honnappa Nagarahalli > Sent: Tuesday, June 11, 2019 9:48 AM > To: Varghese, Vipin ; olivier.matz@6wind.com; > Pattan, Reshma ; Wiles, Keith > ; dev@dpdk.org > Cc: Padubidri, Sanjay A ; Honnappa Nagarahall= i > ; nd ; nd > Subject: RE: [dpdk-dev] [PATCH v1 1/2] lib/ring: add enqueue-dequeue call= abck >=20 > > > > Hi Honnappa, > > > > snipped > > > > > > > > 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. > > > Can you provide a use case for this to better understand the need? > > Use cases: > > - allow user to investigate the contents pre-enqueue. > > - allow user to investigate the contents post-dequeue. > > - modify pre-enqueue and post-dequeue stage content. > > - investigate PMD meta data for debug in field nodes. > > > > snipped > > > > + struct rte_ring_enq_cb_list enq_cbs; > > > > + struct rte_ring_deq_cb_list deq_cbs; }; > > > This breaks ABI compatibility > > Can you help me understand this more clearly? > 'struct rte_ring' is exposed to the application. It is possible that the = application has > declared a variable of type 'struct rte_ring'. Any addition to this struc= ture will > increase the size of 'struct rte_ring'. Hence, it won't be compatible. >=20 > > > > snipped > > > > -rte_ring_enqueue_burst(struct rte_ring *r, void * const > > > > *obj_table, > > > > +rte_ring_enqueue_burst(struct rte_ring *r, void **obj_table, > > > > unsigned int n, unsigned int *free_space) { > > > > +#ifdef RTE_RING_ENQDEQ_CALLBACKS > > > > + struct rte_ring_callback *cb =3D NULL; > > > > + > > > > + TAILQ_FOREACH(cb, &(r->enq_cbs), next) { > > > Need to take the TAILQ lock before this. For ex: what happens if a > > > un-register is called concurrently? > > Let me check this, using rx|tx callback as reference. > > > > > Also, traversing a linked list for every enqueue call would be too > > > costly. May be, understanding the use case will help. > > Internal testing with SP-SC is 0.1% (with extra cost of user > > function). But I will try to explore other alternatives too. > > > > Snipped