From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 3A5162BA5 for ; Mon, 26 Mar 2018 10:47:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Mar 2018 01:47:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,364,1517904000"; d="scan'208";a="214680138" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by fmsmga006.fm.intel.com with ESMTP; 26 Mar 2018 01:47:27 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.216]) by IRSMSX152.ger.corp.intel.com ([169.254.6.128]) with mapi id 14.03.0319.002; Mon, 26 Mar 2018 09:47:27 +0100 From: "Ananyev, Konstantin" To: Neil Horman , "Richardson, Bruce" CC: "Yigit, Ferruh" , "Mcnamara, John" , "Kovacevic, Marko" , Thomas Monjalon , "Pattan, Reshma" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v5] ethdev: return named opaque type instead of void pointer Thread-Index: AQHTwRVNvYixNn12zkOXNwapIrafC6PeDr8AgACZGgCAA5O8MA== Date: Mon, 26 Mar 2018 08:47:25 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258A0AB4349@irsmsx105.ger.corp.intel.com> References: <20180309112531.292163-1-ferruh.yigit@intel.com> <20180320163404.7780-1-ferruh.yigit@intel.com> <20180321130401.GA3225@hmswarspite.think-freely.org> <20180323170034.GA8888@bricha3-MOBL.ger.corp.intel.com> <20180324020832.GA28338@neilslaptop.think-freely.org> In-Reply-To: <20180324020832.GA28338@neilslaptop.think-freely.org> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiN2FlNjJhMWUtNWEzMy00NWYwLWEwOGYtODU2NjQ0ZGI0ZTBkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IngzbU5ZeUcwNVhuNjFzN0VwcE03aFhLdzhoVHVcLzBkYkkySmhWaldvSkRVPSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v5] ethdev: return named opaque type instead of void pointer 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: Mon, 26 Mar 2018 08:47:30 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Neil Horman > Sent: Saturday, March 24, 2018 2:09 AM > To: Richardson, Bruce > Cc: Yigit, Ferruh ; Mcnamara, John ; Kovacevic, Marko > ; Thomas Monjalon ; Patta= n, Reshma ; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v5] ethdev: return named opaque type inste= ad of void pointer >=20 > On Fri, Mar 23, 2018 at 05:00:34PM +0000, Bruce Richardson wrote: > > On Wed, Mar 21, 2018 at 09:04:01AM -0400, Neil Horman wrote: > > > On Tue, Mar 20, 2018 at 04:34:04PM +0000, Ferruh Yigit wrote: > > > > "struct rte_eth_rxtx_callback" is defined as internal data structur= e and > > > > used as named opaque type. > > > > > > > > So the functions that are adding callbacks can return objects in th= is > > > > type instead of void pointer. > > > > > > > > Also const qualifier added to "struct rte_eth_rxtx_callback *" to > > > > protect it better from application modification. > > > > > > > > Signed-off-by: Ferruh Yigit > > > > --- > > > > v2: > > > > * keep using struct * in parameters, instead add callback functions > > > > return struct rte_eth_rxtx_callback pointer. > > > > > > > > v4: > > > > * Remove deprecation notice. LIBABIVER already increased in this re= lease > > > > > > > > v5: > > > > * add const qualifier to rte_eth_rxtx_callback > > > I still wish we could find a way to remove the inline functions and t= ruly > > > protect that struct, but a const is definately better than nothing > > > > > > Acked-by: Neil Horman > > > > > Actually, I think we should do exactly that - convert the rx and tx bur= st > > calls into actual function calls (and consider any other inlined functi= ons > > too). The cost would be the overhead of making an additional function c= all > > per-burst, which is likely to be pretty minimal for most common burst s= izes > > e.g. 32. > > > > We did some quick tests here with the i40e driver, and for a burst size= of > > 32 saw less than 1% perf drop, and for even a small burst of 8 saw less > > than 5% drop. Note that this is testing with testpmd, which has nothing= but > > I/O in the datapath. A real-world app is likely to do far more with the > > packets and therefore see proportionally far less perf hit. > > > > Thoughts? > > > > /Bruce > > > > PS: This un-inlining could probably be applied to other device types to= o, > > e.g. cryptodev (though probably not eventdev as it tends to have smalle= r > > bursts in some use-cases). > > > I would be 1000% on board with this conversion. +1 from me too. It would allow to greatly simplify support and further development for ethd= ev. Konstantin