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 A8B92A00E6 for ; Tue, 11 Jun 2019 06:17:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 83B9A1C258; Tue, 11 Jun 2019 06:17:42 +0200 (CEST) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30062.outbound.protection.outlook.com [40.107.3.62]) by dpdk.org (Postfix) with ESMTP id 492CE1C257 for ; Tue, 11 Jun 2019 06:17:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8hQuqS0vljcnxpTvJZyU3gBpu00ye4HnNh4kd7d6T5I=; b=QjFneUPdkuXSBiz6rSVm0+d0Ozlg/6OJxGpWJKZN85vRZCtucctlQFh03A+Fj09icHbHVl1FSKzuv1L6lxALFLGJLl4ulqyzF7rR0jZzveKYVHSQX3wQKEQKvBgY6qaqUEC3xIUIPm/xNujxnFRBviAT0PmQgSN5LRP7lKF3F9k= Received: from VE1PR08MB5149.eurprd08.prod.outlook.com (20.179.30.152) by VE1PR08MB4925.eurprd08.prod.outlook.com (10.255.114.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.15; Tue, 11 Jun 2019 04:17:39 +0000 Received: from VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::9983:2882:a24:c0b0]) by VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::9983:2882:a24:c0b0%5]) with mapi id 15.20.1965.017; Tue, 11 Jun 2019 04:17:39 +0000 From: Honnappa Nagarahalli To: "Varghese, Vipin" , "olivier.matz@6wind.com" , "Pattan, Reshma" , "Wiles, Keith" , "dev@dpdk.org" CC: "Padubidri, Sanjay A" , Honnappa Nagarahalli , nd , nd Thread-Topic: [dpdk-dev] [PATCH v1 1/2] lib/ring: add enqueue-dequeue callabck Thread-Index: AQHVHJZWfdT7ASJYqEOhdZNDSUTduKaPr92ggAStRwCAAYHeIA== Date: Tue, 11 Jun 2019 04:17:39 +0000 Message-ID: References: <20190606183355.56734-1-vipin.varghese@intel.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D366038@BGSMSX101.gar.corp.intel.com> In-Reply-To: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D366038@BGSMSX101.gar.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: d84af4e6-8dcc-4484-a99f-3a6d8d58a462.0 x-checkrecipientchecked: true authentication-results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; x-originating-ip: [107.77.217.229] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 46462758-77bb-45ae-dee6-08d6ee23be06 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VE1PR08MB4925; x-ms-traffictypediagnostic: VE1PR08MB4925: nodisclaimer: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 006546F32A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(136003)(396003)(39860400002)(346002)(376002)(199004)(189003)(66066001)(54906003)(110136005)(9686003)(55016002)(229853002)(2501003)(186003)(2906002)(486006)(26005)(6436002)(316002)(66476007)(64756008)(66446008)(66556008)(476003)(11346002)(446003)(52536014)(33656002)(73956011)(99286004)(76116006)(66946007)(81156014)(7736002)(8936002)(4326008)(76176011)(81166006)(25786009)(72206003)(14454004)(8676002)(478600001)(6506007)(74316002)(305945005)(6246003)(53936002)(86362001)(3846002)(68736007)(5660300002)(71200400001)(71190400001)(7696005)(256004)(14444005)(102836004)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB4925; H:VE1PR08MB5149.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Cyeg0h3Hc1+qEZOwBRX9k22jDxoEs2sx1TyeJi0tW3yVIp5mJpTOrmZlCnRDtBIVcfFJhy6p1aF7qnd61i8snQVbL3BqJ0ZlDHE058pMZ0d3iRAdebUThRa+7+xY3VnVQGTge05Kg/lZ+y6t92hrE/3JkZFVhScKJ95G5zLjsRr6STSD6kbhCtDmX3MPplZA1SmbGfgdVX+tIz1B2E4XWt4YGgmika139BRfRZnnnSBUEa5PhkD+S+yHvchDW8n7UPsK4fZHv1cMiiyFVjFAy5F7+8DvS6LvU4/UOZn4OXi3WiYSohMmjy8YLDQLiEwb9N4eepO4cvF1FwNbkl6f17RDlqIY8U5fIepKvt2ncoBXATn5BsgBsSqQwzoDbUtkJ8yR3pNAlMp+xsghbBE51ZuAFNzRAM7QC5j6jsBbRgU= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46462758-77bb-45ae-dee6-08d6ee23be06 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jun 2019 04:17:39.7202 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Honnappa.Nagarahalli@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4925 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" >=20 > Hi Honnappa, >=20 > 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. >=20 > 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 ap= plication has declared a variable of type 'struct rte_ring'. Any addition t= o this structure 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. >=20 > > 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). B= ut I will > try to explore other alternatives too. >=20 > Snipped