dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
* [dpdk-dev] [RFC 19.11 0/2] Hide DPDK internal struct from public API
@ 2019-07-30 12:49 Marcin Zapolski
  2019-07-30 12:49 ` [dpdk-dev] [RFC 19.11 1/2] ethdev: make DPDK core functions non-inline Marcin Zapolski
                   ` (5 more replies)
  0 siblings, 6 replies; 33+ messages in thread
From: Marcin Zapolski @ 2019-07-30 12:49 UTC (permalink / raw)
  To: dev; +Cc: Marcin Zapolski

Several DPDK internal structures are exposed to direct access by user
applications. This patch removes them from public API, and makes core DPDK
functions that use them non-inline.

Marcin Zapolski (2):
  ethdev: make DPDK core functions non-inline
  ethdev: hide DPDK internal struct from public API

 drivers/net/cxgbe/base/adapter.h              |   1 +
 drivers/net/netvsc/hn_nvs.c                   |   1 +
 drivers/net/netvsc/hn_rxtx.c                  |   1 +
 lib/librte_ethdev/ethdev_private.h            |   1 +
 lib/librte_ethdev/ethdev_profile.h            |   1 +
 lib/librte_ethdev/rte_ethdev.c                | 168 +++++++++++++++++
 lib/librte_ethdev/rte_ethdev.h                | 169 ++----------------
 lib/librte_ethdev/rte_ethdev_driver.h         |   1 +
 lib/librte_ethdev/rte_ethdev_version.map      |  12 ++
 lib/librte_ethdev/rte_flow.c                  |   1 +
 lib/librte_ethdev/rte_flow_driver.h           |   1 +
 lib/librte_ethdev/rte_mtr.c                   |   1 +
 lib/librte_ethdev/rte_mtr_driver.h            |   1 +
 lib/librte_ethdev/rte_tm.c                    |   1 +
 lib/librte_ethdev/rte_tm_driver.h             |   1 +
 .../rte_event_eth_rx_adapter.c                |   1 +
 .../rte_event_eth_tx_adapter.c                |   1 +
 lib/librte_eventdev/rte_eventdev.c            |   1 +
 lib/librte_telemetry/rte_telemetry.c          |   1 +
 19 files changed, 211 insertions(+), 154 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 33+ messages in thread
* Re: [dpdk-dev] [RFC 19.11 1/2] ethdev: make DPDK core functions non-inline
@ 2019-07-30 15:45 Jerin Jacob Kollanukkaran
  2019-07-30 16:05 ` Bruce Richardson
  0 siblings, 1 reply; 33+ messages in thread
From: Jerin Jacob Kollanukkaran @ 2019-07-30 15:45 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Marcin Zapolski, dev

> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Tuesday, July 30, 2019 9:02 PM
> To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
> Cc: Marcin Zapolski <marcinx.a.zapolski@intel.com>; dev@dpdk.org
> Subject: [EXT] Re: [dpdk-dev] [RFC 19.11 1/2] ethdev: make DPDK core functions
> non-inline
> 
> ----------------------------------------------------------------------
> On Tue, Jul 30, 2019 at 03:01:00PM +0000, Jerin Jacob Kollanukkaran wrote:
> > > -----Original Message----- From: dev <dev-bounces@dpdk.org> On
> > > Behalf Of Marcin Zapolski Sent: Tuesday, July 30, 2019 6:20 PM To:
> > > dev@dpdk.org Cc: Marcin Zapolski <marcinx.a.zapolski@intel.com>
> > > Subject: [dpdk-dev] [RFC 19.11 1/2] ethdev: make DPDK core functions
> > > non- inline
> > >
> > > Make rte_eth_rx_burst, rte_eth_tx_burst and other static inline
> > > ethdev functions not inline. They are referencing DPDK internal
> > > structures and inlining forces those structures to be exposed to user
> applications.
> > >
> > > In internal testing with i40e NICs a performance drop of about 2%
> > > was observed with testpmd.
> >
> > I tested on two class of arm64 machines(Highend and lowend) one has
> > 1.4% drop And other one has 3.6% drop.
> >
> This is with testpmd only right? I'd just point out that we need to remember that
> these numbers need to be scaled down appropriately for a realworld app where
> IO is only a (hopefully small) proportion of the packet processing budget. For
> example, I would expect the ~2% drop we saw in testpmd to correspond to
> <0.5% drop in something like OVS.

I see it as bit different view, Cycles saved infrastructure layer, cycles gained in
application. So IMO it vary between end user application need what kind of
machine it runs.

> 
> > I second to not expose internal data structure to avoid ABI break.
> >
> > IMO, This patch has performance issue due to it is fixing it in simple
> > way.
> >
> > It is not worth two have function call overhead to call the driver
> > function.  Some thoughts below to reduce the performance impact
> > without exposing internal structures.
> >
> The big concern I have with what you propose is that would involve changing
> each and every ethdev driver in DPDK! I'd prefer to make sure that the impact of
> this change is actually felt in real-world apps before we start looking to make
> such updates across the DPDK codebase.

I see those changes are NO BRAINER from driver POV. Once we add in one driver, individual
PMD Maintainer can update easily. I think, we can do it once for all.
I am sure, you must aware of How hard is make 2% improvement in driver. I can spend time in
This NO brainer to get 2% improvement back. I prefer later.


> 
> > And I think, We need to follow the similar mechanism for cryptodev,
> > Eventdev, rawdev Etc so bring the common scheme to address this semantics
> will be use full.
> >
> Agreed.
> 
> Regards,
> /Bruce

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2019-09-14 10:34 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-30 12:49 [dpdk-dev] [RFC 19.11 0/2] Hide DPDK internal struct from public API Marcin Zapolski
2019-07-30 12:49 ` [dpdk-dev] [RFC 19.11 1/2] ethdev: make DPDK core functions non-inline Marcin Zapolski
2019-07-30 15:01   ` Jerin Jacob Kollanukkaran
2019-07-30 15:32     ` Bruce Richardson
2019-07-30 15:25   ` Stephen Hemminger
2019-07-30 15:33     ` Bruce Richardson
2019-07-30 15:54       ` Stephen Hemminger
2019-07-30 16:04         ` Wiles, Keith
2019-07-30 16:11         ` Bruce Richardson
2019-07-30 16:23           ` Stephen Hemminger
2019-07-30 12:49 ` [dpdk-dev] [RFC 19.11 2/2] ethdev: hide DPDK internal struct from public API Marcin Zapolski
2019-07-30 14:53   ` Ferruh Yigit
2019-09-06 13:18 ` [dpdk-dev] [RFC 19.11 v2 0/3] Hide " Marcin Zapolski
2019-09-06 14:00   ` Bruce Richardson
2019-09-06 13:18 ` [dpdk-dev] [RFC 19.11 v2 1/3] ethdev: hide key ethdev structures " Marcin Zapolski
2019-09-06 14:37   ` Ferruh Yigit
2019-09-09  8:07     ` Zapolski, MarcinX A
2019-09-09  9:59       ` Ferruh Yigit
2019-09-09 10:02         ` Zapolski, MarcinX A
2019-09-09 10:24           ` Ferruh Yigit
2019-09-09 11:41             ` Zapolski, MarcinX A
2019-09-14 10:34             ` Jerin Jacob
2019-09-06 17:24   ` Stephen Hemminger
2019-09-09  9:01     ` Zapolski, MarcinX A
2019-09-10  9:59   ` Zapolski, MarcinX A
2019-09-10 10:06     ` Bruce Richardson
2019-09-10 10:13       ` Zapolski, MarcinX A
2019-09-10 12:19         ` Bruce Richardson
2019-09-10 12:22           ` Zapolski, MarcinX A
2019-09-06 13:18 ` [dpdk-dev] [RFC 19.11 v2 2/3] i40e: make driver compatible with changes in ethdev Marcin Zapolski
2019-09-06 13:18 ` [dpdk-dev] [RFC 19.11 v2 3/3] ixgbe: " Marcin Zapolski
2019-07-30 15:45 [dpdk-dev] [RFC 19.11 1/2] ethdev: make DPDK core functions non-inline Jerin Jacob Kollanukkaran
2019-07-30 16:05 ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).