From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 8C8445F4D for ; Fri, 23 Mar 2018 18:00:40 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Mar 2018 10:00:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,351,1517904000"; d="scan'208";a="28277484" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.25.51]) by orsmga006.jf.intel.com with SMTP; 23 Mar 2018 10:00:35 -0700 Received: by (sSMTP sendmail emulation); Fri, 23 Mar 2018 17:00:34 +0000 Date: Fri, 23 Mar 2018 17:00:34 +0000 From: Bruce Richardson To: Neil Horman Cc: Ferruh Yigit , John McNamara , Marko Kovacevic , Thomas Monjalon , Reshma Pattan , dev@dpdk.org Message-ID: <20180323170034.GA8888@bricha3-MOBL.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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180321130401.GA3225@hmswarspite.think-freely.org> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.9.4 (2018-02-28) 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: Fri, 23 Mar 2018 17:00:40 -0000 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 structure and > > used as named opaque type. > > > > So the functions that are adding callbacks can return objects in this > > 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 release > > > > v5: > > * add const qualifier to rte_eth_rxtx_callback > I still wish we could find a way to remove the inline functions and truly > 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 burst calls into actual function calls (and consider any other inlined functions too). The cost would be the overhead of making an additional function call per-burst, which is likely to be pretty minimal for most common burst sizes 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 too, e.g. cryptodev (though probably not eventdev as it tends to have smaller bursts in some use-cases).