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 741C3A05DC for ; Mon, 10 Jun 2019 07:13:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 232AC1BDF9; Mon, 10 Jun 2019 07:13:01 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id DAD861BDF1 for ; Mon, 10 Jun 2019 07:12:59 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jun 2019 22:12:58 -0700 X-ExtLoop1: 1 Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga001.jf.intel.com with ESMTP; 09 Jun 2019 22:12:58 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 9 Jun 2019 22:12:58 -0700 Received: from bgsmsx155.gar.corp.intel.com (10.224.48.102) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 9 Jun 2019 22:12:58 -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:42:55 +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+y7b3zcuwKaPWBoAgAUDn1A= Date: Mon, 10 Jun 2019 05:12:54 +0000 Message-ID: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D366038@BGSMSX101.gar.corp.intel.com> References: <20190606183355.56734-1-vipin.varghese@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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmQ3ZTQwOGUtNzdmMC00MmFhLTkzNWUtMGY5OTY3ZmMyMzBjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUDNqQXFXNmJvRWd3UStcL1wvNDRqV3lUbkhkTDdDTWhWVm5VUUx0aVlPZG1KTUdkSGpZeXB4TFJXVGtOSTV1M0U1In0= 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" 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? 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-reg= ister 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