From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 92EB8107A for ; Fri, 1 Dec 2017 12:22:16 +0100 (CET) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Dec 2017 03:22:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,344,1508828400"; d="scan'208";a="182383994" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by fmsmga005.fm.intel.com with ESMTP; 01 Dec 2017 03:22:14 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.67]) by IRSMSX151.ger.corp.intel.com ([169.254.4.108]) with mapi id 14.03.0319.002; Fri, 1 Dec 2017 11:22:13 +0000 From: "Ananyev, Konstantin" To: "Richardson, Bruce" , "Yigit, Ferruh" CC: Thomas Monjalon , "dev@dpdk.org" , "vladz@cloudius-systems.com" Thread-Topic: [dpdk-dev] [PATCH 7/7] ethdev: use opaque user callback object Thread-Index: AQHTakyUBd9DieAdMkK6gdUN/xphcqMuSvaAgAANInA= Date: Fri, 1 Dec 2017 11:22:12 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772585FAC3718@irsmsx105.ger.corp.intel.com> References: <20171201022957.64329-1-ferruh.yigit@intel.com> <20171201022957.64329-7-ferruh.yigit@intel.com> <20171201103308.GB10384@bricha3-MOBL3.ger.corp.intel.com> In-Reply-To: <20171201103308.GB10384@bricha3-MOBL3.ger.corp.intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2ViOGMzZDktNDJlMC00NjViLTljYWQtOGM4YmQ0ZWY3NTM2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImUyQmVUVzV2dGpHb1FaYVwvRnJnOG50emxRek9DaUllM2NlaVdKeHhMTm1rPSJ9 x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action 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 7/7] ethdev: use opaque user callback object 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: , X-List-Received-Date: Fri, 01 Dec 2017 11:22:17 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson > Sent: Friday, December 1, 2017 10:33 AM > To: Yigit, Ferruh > Cc: Thomas Monjalon ; dev@dpdk.org; vladz@cloudius-s= ystems.com > Subject: Re: [dpdk-dev] [PATCH 7/7] ethdev: use opaque user callback obje= ct >=20 > On Fri, Dec 01, 2017 at 02:29:57AM +0000, Ferruh Yigit wrote: > > "struct rte_eth_rxtx_callback" is defined as internal data structure bu= t > > used in public APIs. > > > > Checking the API documentation shows that intention was using this > > object as opaque object. Data structure only used in delete APIs which > > doesn't require to know the internals of the data structure. > > > > Converting callback parameter in API to void pointer should not require > > any modification in user application because this data structure was > > already marked as internal and only should be used as pointer in > > application. > > > > Signed-off-by: Ferruh Yigit > > --- >=20 > I disagree on this patch. The structure itself is not exposed, only the > name, since it is only passed around as a pointer, so there is no need > to change the parameters to void pointer. It's a named opaque type. Personally I think it would be better to do visa-versa:=20 make rte_eth_add_(rx|tx)_callback() to return struct rte_eth_rxtx_callback = * instead of void *. Konstantin