DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] RFC: hiding struct rte_eth_dev
@ 2019-09-23 16:19 Ray Kinsella
  2019-09-23 16:35 ` Bruce Richardson
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Ray Kinsella @ 2019-09-23 16:19 UTC (permalink / raw)
  To: dpdk-dev
  Cc: Richardson, Bruce, Jerin Jacob Kollanukkaran, Hemant Agrawal,
	Thomas Monjalon, Stephen Hemminger, Yigit, Ferruh, Ananyev,
	Konstantin, maxime.coquelin, David Marchand, Marcin Zapolski

Hi folks,

The ABI Stability proposals should be pretty well known at this point.
The latest rev is here ...

http://inbox.dpdk.org/dev/1565864619-17206-1-git-send-email-mdr@ashroe.eu/

As has been discussed public data structure's are risky for ABI
stability, as any changes to a data structure can change the ABI. As a
general rule you want to expose as few as possible (ideally none), and
keep them as small as possible.

One of the key data structures in DPDK is `struct rte_eth_dev`. In this
case, rte_eth_dev is exposed public-ally, as a side-effect of the
inlining of the [rx,tx]_burst functions.

Marcin Zapolski has been looking at what to do about it, with no current
consensus on a path forward. The options on our table is:-

1. Do nothing, live with the risk to DPDK v20 ABI stability.

2. Pad rte_eth_dev, add some extra bytes to the structure "in case" we
need to add a field during the v20 ABI (through to 20.11).

3. Break rte_eth_dev into public and private structs.
  - See
http://inbox.dpdk.org/dev/20190906131813.1343-1-marcinx.a.zapolski@intel.com/
  - This ends up quiet an invasive patch, late in the cycle, however it
does have no performance penalty.

4. Uninline [rx,tx]_burst functions
 -  See
http://inbox.dpdk.org/dev/20190730124950.1293-1-marcinx.a.zapolski@intel.com/
 - This has a performance penalty of ~2% with testpmd, impact on a "real
workload" is likely to be in the noise.

We need to agree an approach for v19.11, and that may be we agree to do
nothing. My personal vote is 4. as the simplest with minimal impact.

Thanks,

Ray K

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

* Re: [dpdk-dev] RFC: hiding struct rte_eth_dev
  2019-09-23 16:19 [dpdk-dev] RFC: hiding struct rte_eth_dev Ray Kinsella
@ 2019-09-23 16:35 ` Bruce Richardson
  2019-09-24  9:07 ` Morten Brørup
  2019-09-24 16:42 ` Jerin Jacob
  2 siblings, 0 replies; 8+ messages in thread
From: Bruce Richardson @ 2019-09-23 16:35 UTC (permalink / raw)
  To: Ray Kinsella
  Cc: dpdk-dev, Jerin Jacob Kollanukkaran, Hemant Agrawal,
	Thomas Monjalon, Stephen Hemminger, Yigit, Ferruh, Ananyev,
	Konstantin, maxime.coquelin, David Marchand, Marcin Zapolski

On Mon, Sep 23, 2019 at 05:19:27PM +0100, Ray Kinsella wrote:
> Hi folks,
> 
> The ABI Stability proposals should be pretty well known at this point.
> The latest rev is here ...
> 
> http://inbox.dpdk.org/dev/1565864619-17206-1-git-send-email-mdr@ashroe.eu/
> 
> As has been discussed public data structure's are risky for ABI
> stability, as any changes to a data structure can change the ABI. As a
> general rule you want to expose as few as possible (ideally none), and
> keep them as small as possible.
> 
> One of the key data structures in DPDK is `struct rte_eth_dev`. In this
> case, rte_eth_dev is exposed public-ally, as a side-effect of the
> inlining of the [rx,tx]_burst functions.
> 
> Marcin Zapolski has been looking at what to do about it, with no current
> consensus on a path forward. The options on our table is:-
> 
> 1. Do nothing, live with the risk to DPDK v20 ABI stability.
> 
> 2. Pad rte_eth_dev, add some extra bytes to the structure "in case" we
> need to add a field during the v20 ABI (through to 20.11).
> 
> 3. Break rte_eth_dev into public and private structs.
>   - See
> http://inbox.dpdk.org/dev/20190906131813.1343-1-marcinx.a.zapolski@intel.com/
>   - This ends up quiet an invasive patch, late in the cycle, however it
> does have no performance penalty.
> 
> 4. Uninline [rx,tx]_burst functions
>  -  See
> http://inbox.dpdk.org/dev/20190730124950.1293-1-marcinx.a.zapolski@intel.com/
>  - This has a performance penalty of ~2% with testpmd, impact on a "real
> workload" is likely to be in the noise.
> 
> We need to agree an approach for v19.11, and that may be we agree to do
> nothing. My personal vote is 4. as the simplest with minimal impact.
> 
Thanks for calling out these potential options, Ray.

#4, uninlining, would also be my preference, though I think #1, do nothing,
is probably ok and could live with #2, adding padding, if others like the
idea. While #3, splitting structures, has advantages, I just dislike how
invasive it is, and don't think it's a good candidate for 19.11.

/Bruce

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

* Re: [dpdk-dev] RFC: hiding struct rte_eth_dev
  2019-09-23 16:19 [dpdk-dev] RFC: hiding struct rte_eth_dev Ray Kinsella
  2019-09-23 16:35 ` Bruce Richardson
@ 2019-09-24  9:07 ` Morten Brørup
  2019-09-24 16:42 ` Jerin Jacob
  2 siblings, 0 replies; 8+ messages in thread
From: Morten Brørup @ 2019-09-24  9:07 UTC (permalink / raw)
  To: Ray Kinsella, dpdk-dev
  Cc: Richardson, Bruce, Jerin Jacob Kollanukkaran, Hemant Agrawal,
	Thomas Monjalon, Stephen Hemminger, Yigit, Ferruh, Ananyev,
	Konstantin, maxime.coquelin, David Marchand, Marcin Zapolski

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ray Kinsella
> Sent: Monday, September 23, 2019 6:19 PM
> To: dpdk-dev
> Cc: Richardson, Bruce; Jerin Jacob Kollanukkaran; Hemant Agrawal;
> Thomas Monjalon; Stephen Hemminger; Yigit, Ferruh; Ananyev, Konstantin;
> maxime.coquelin@redhat.com; David Marchand; Marcin Zapolski
> Subject: [dpdk-dev] RFC: hiding struct rte_eth_dev
> 
> Hi folks,
> 
> The ABI Stability proposals should be pretty well known at this point.
> The latest rev is here ...
> 
> http://inbox.dpdk.org/dev/1565864619-17206-1-git-send-email-
> mdr@ashroe.eu/
> 
> As has been discussed public data structure's are risky for ABI
> stability, as any changes to a data structure can change the ABI. As a
> general rule you want to expose as few as possible (ideally none), and
> keep them as small as possible.
> 
> One of the key data structures in DPDK is `struct rte_eth_dev`. In this
> case, rte_eth_dev is exposed public-ally, as a side-effect of the
> inlining of the [rx,tx]_burst functions.
> 
> Marcin Zapolski has been looking at what to do about it, with no
> current
> consensus on a path forward. The options on our table is:-
> 
> 1. Do nothing, live with the risk to DPDK v20 ABI stability.
> 
> 2. Pad rte_eth_dev, add some extra bytes to the structure "in case" we
> need to add a field during the v20 ABI (through to 20.11).
> 
> 3. Break rte_eth_dev into public and private structs.
>   - See
> http://inbox.dpdk.org/dev/20190906131813.1343-1-
> marcinx.a.zapolski@intel.com/
>   - This ends up quiet an invasive patch, late in the cycle, however it
> does have no performance penalty.
> 
> 4. Uninline [rx,tx]_burst functions
>  -  See
> http://inbox.dpdk.org/dev/20190730124950.1293-1-
> marcinx.a.zapolski@intel.com/
>  - This has a performance penalty of ~2% with testpmd, impact on a
> "real
> workload" is likely to be in the noise.
> 
> We need to agree an approach for v19.11, and that may be we agree to do
> nothing. My personal vote is 4. as the simplest with minimal impact.
> 
> Thanks,
> 
> Ray K

First of all, consider why an application would need to access the rte_eth_dev structure directly. I don't see why. So I assume that the only issue with hiding it behind an opaque handle is its use in the [rx,tx]_burst functions.

Next, let's consider the impact of uninlining the [rx,tx]_burst functions. An actual application would have to be extremely simple for the impact to be anywhere near the 2 % seen with testpmd.

Thus I vote for #4.
#3 is even better than #4, assuming performance *of core functionality* trumps general readability and maintainability. And it probably doesn't affect readability and maintainability for DPDK users/consumers. So I also vote for #3.


I think the decision about uninlining core functions should be a decision about the general principle, which should be discussed thoroughly, perhaps using this as a reference example.


Furthermore, I would like to repeat my old request for a more realistic reference performance benchmark application than testpmd if performance benchmark results are used as arguments for or against suggestions like this.

With testpmd, everything flies directly through the cache. I would be so bold as to claim that if you shuffle the mbuf fields between the first and second cache line, you probably wouldn't see any difference with testpmd; the packet goes directly to the tx step after the rx step, and the cache miss that would normally be seen in the tx step is instead taken in the rx step, so there is no performance difference.

A reference performance benchmark application should have at least two or three separate steps, each processing a sufficiently large amount of packets, so the cache is only efficient within each step. It could be an ingress step for receiving and enqueueing the packets, a delay step holding enough packets for their information to disappear from the cache, and an egress step for dequeueing and transmitting the packets.



Med venlig hilsen / kind regards
- Morten Brørup

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

* Re: [dpdk-dev] RFC: hiding struct rte_eth_dev
  2019-09-23 16:19 [dpdk-dev] RFC: hiding struct rte_eth_dev Ray Kinsella
  2019-09-23 16:35 ` Bruce Richardson
  2019-09-24  9:07 ` Morten Brørup
@ 2019-09-24 16:42 ` Jerin Jacob
  2019-09-24 16:50   ` Ananyev, Konstantin
  2 siblings, 1 reply; 8+ messages in thread
From: Jerin Jacob @ 2019-09-24 16:42 UTC (permalink / raw)
  To: Ray Kinsella
  Cc: dpdk-dev, Richardson, Bruce, Jerin Jacob Kollanukkaran,
	Hemant Agrawal, Thomas Monjalon, Stephen Hemminger, Yigit,
	Ferruh, Ananyev, Konstantin, maxime.coquelin, David Marchand,
	Marcin Zapolski

On Mon, Sep 23, 2019 at 9:49 PM Ray Kinsella <mdr@ashroe.eu> wrote:
>
> Hi folks,
>
> The ABI Stability proposals should be pretty well known at this point.
> The latest rev is here ...
>
> http://inbox.dpdk.org/dev/1565864619-17206-1-git-send-email-mdr@ashroe.eu/
>
> As has been discussed public data structure's are risky for ABI
> stability, as any changes to a data structure can change the ABI. As a
> general rule you want to expose as few as possible (ideally none), and
> keep them as small as possible.
>
> One of the key data structures in DPDK is `struct rte_eth_dev`. In this
> case, rte_eth_dev is exposed public-ally, as a side-effect of the
> inlining of the [rx,tx]_burst functions.
>
> Marcin Zapolski has been looking at what to do about it, with no current
> consensus on a path forward. The options on our table is:-
>
> 1. Do nothing, live with the risk to DPDK v20 ABI stability.
>
> 2. Pad rte_eth_dev, add some extra bytes to the structure "in case" we
> need to add a field during the v20 ABI (through to 20.11).
>
> 3. Break rte_eth_dev into public and private structs.
>   - See
> http://inbox.dpdk.org/dev/20190906131813.1343-1-marcinx.a.zapolski@intel.com/
>   - This ends up quiet an invasive patch, late in the cycle, however it
> does have no performance penalty.
>
> 4. Uninline [rx,tx]_burst functions
>  -  See
> http://inbox.dpdk.org/dev/20190730124950.1293-1-marcinx.a.zapolski@intel.com/
>  - This has a performance penalty of ~2% with testpmd, impact on a "real
> workload" is likely to be in the noise.
>
> We need to agree an approach for v19.11, and that may be we agree to do
> nothing. My personal vote is 4. as the simplest with minimal impact.

My preference NOT to do #4. Reasons are:
- I have seen performance drop from 1.5% to 3.5% based on the arm64
cores in use(Embedded vs Server cores)
-  We need the correct approach to cater to cryptodev and eventdev as
well. If #4 is checked in, We will
take shotcut for cryptodev and eventdev

My preference  #1, do nothing, is probably ok and could live with #2,
adding padding,
and fix properly with #3 as when needed and use #3 scheme for crypto
dev and eventdev as well.


>
> Thanks,
>
> Ray K

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

* Re: [dpdk-dev] RFC: hiding struct rte_eth_dev
  2019-09-24 16:42 ` Jerin Jacob
@ 2019-09-24 16:50   ` Ananyev, Konstantin
  2019-09-26 11:13     ` Andrew Rybchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Ananyev, Konstantin @ 2019-09-24 16:50 UTC (permalink / raw)
  To: Jerin Jacob, Ray Kinsella
  Cc: dpdk-dev, Richardson, Bruce, Jerin Jacob Kollanukkaran,
	Hemant Agrawal, Thomas Monjalon, Stephen Hemminger, Yigit,
	Ferruh, maxime.coquelin, David Marchand, Zapolski, MarcinX A


Hi everyone,

> >
> > Hi folks,
> >
> > The ABI Stability proposals should be pretty well known at this point.
> > The latest rev is here ...
> >
> > http://inbox.dpdk.org/dev/1565864619-17206-1-git-send-email-mdr@ashroe.eu/
> >
> > As has been discussed public data structure's are risky for ABI
> > stability, as any changes to a data structure can change the ABI. As a
> > general rule you want to expose as few as possible (ideally none), and
> > keep them as small as possible.
> >
> > One of the key data structures in DPDK is `struct rte_eth_dev`. In this
> > case, rte_eth_dev is exposed public-ally, as a side-effect of the
> > inlining of the [rx,tx]_burst functions.
> >
> > Marcin Zapolski has been looking at what to do about it, with no current
> > consensus on a path forward. The options on our table is:-
> >
> > 1. Do nothing, live with the risk to DPDK v20 ABI stability.
> >
> > 2. Pad rte_eth_dev, add some extra bytes to the structure "in case" we
> > need to add a field during the v20 ABI (through to 20.11).
> >
> > 3. Break rte_eth_dev into public and private structs.
> >   - See
> > http://inbox.dpdk.org/dev/20190906131813.1343-1-marcinx.a.zapolski@intel.com/
> >   - This ends up quiet an invasive patch, late in the cycle, however it
> > does have no performance penalty.
> >
> > 4. Uninline [rx,tx]_burst functions
> >  -  See
> > http://inbox.dpdk.org/dev/20190730124950.1293-1-marcinx.a.zapolski@intel.com/
> >  - This has a performance penalty of ~2% with testpmd, impact on a "real
> > workload" is likely to be in the noise.
> >
> > We need to agree an approach for v19.11, and that may be we agree to do
> > nothing. My personal vote is 4. as the simplest with minimal impact.
> 
> My preference NOT to do #4. Reasons are:
> - I have seen performance drop from 1.5% to 3.5% based on the arm64
> cores in use(Embedded vs Server cores)
> -  We need the correct approach to cater to cryptodev and eventdev as
> well. If #4 is checked in, We will
> take shotcut for cryptodev and eventdev
> 
> My preference  #1, do nothing, is probably ok and could live with #2,
> adding padding,
> and fix properly with #3 as when needed and use #3 scheme for crypto
> dev and eventdev as well.
> 
> 

My preference would be #4 also.
If that's not an option, then I suppose #1 for 19.11 and #3 for next release
when ABI breakage would be allowed.
BTW, good point that we need similar thing for other dev types too.
Konstantin


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

* Re: [dpdk-dev] RFC: hiding struct rte_eth_dev
  2019-09-24 16:50   ` Ananyev, Konstantin
@ 2019-09-26 11:13     ` Andrew Rybchenko
  2019-09-26 11:50       ` David Marchand
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Rybchenko @ 2019-09-26 11:13 UTC (permalink / raw)
  To: Ananyev, Konstantin, Jerin Jacob, Ray Kinsella
  Cc: dpdk-dev, Richardson, Bruce, Jerin Jacob Kollanukkaran,
	Hemant Agrawal, Thomas Monjalon, Stephen Hemminger, Yigit,
	Ferruh, maxime.coquelin, David Marchand, Zapolski, MarcinX A

On 9/24/19 7:50 PM, Ananyev, Konstantin wrote:
> Hi everyone,
>
>>> Hi folks,
>>>
>>> The ABI Stability proposals should be pretty well known at this point.
>>> The latest rev is here ...
>>>
>>> http://inbox.dpdk.org/dev/1565864619-17206-1-git-send-email-mdr@ashroe.eu/
>>>
>>> As has been discussed public data structure's are risky for ABI
>>> stability, as any changes to a data structure can change the ABI. As a
>>> general rule you want to expose as few as possible (ideally none), and
>>> keep them as small as possible.
>>>
>>> One of the key data structures in DPDK is `struct rte_eth_dev`. In this
>>> case, rte_eth_dev is exposed public-ally, as a side-effect of the
>>> inlining of the [rx,tx]_burst functions.
>>>
>>> Marcin Zapolski has been looking at what to do about it, with no current
>>> consensus on a path forward. The options on our table is:-
>>>
>>> 1. Do nothing, live with the risk to DPDK v20 ABI stability.
>>>
>>> 2. Pad rte_eth_dev, add some extra bytes to the structure "in case" we
>>> need to add a field during the v20 ABI (through to 20.11).
>>>
>>> 3. Break rte_eth_dev into public and private structs.
>>>    - See
>>> http://inbox.dpdk.org/dev/20190906131813.1343-1-marcinx.a.zapolski@intel.com/
>>>    - This ends up quiet an invasive patch, late in the cycle, however it
>>> does have no performance penalty.
>>>
>>> 4. Uninline [rx,tx]_burst functions
>>>   -  See
>>> http://inbox.dpdk.org/dev/20190730124950.1293-1-marcinx.a.zapolski@intel.com/
>>>   - This has a performance penalty of ~2% with testpmd, impact on a "real
>>> workload" is likely to be in the noise.
>>>
>>> We need to agree an approach for v19.11, and that may be we agree to do
>>> nothing. My personal vote is 4. as the simplest with minimal impact.
>> My preference NOT to do #4. Reasons are:
>> - I have seen performance drop from 1.5% to 3.5% based on the arm64
>> cores in use(Embedded vs Server cores)
>> -  We need the correct approach to cater to cryptodev and eventdev as
>> well. If #4 is checked in, We will
>> take shotcut for cryptodev and eventdev
>>
>> My preference  #1, do nothing, is probably ok and could live with #2,
>> adding padding,
>> and fix properly with #3 as when needed and use #3 scheme for crypto
>> dev and eventdev as well.
>>
>>
> My preference would be #4 also.
> If that's not an option, then I suppose #1 for 19.11 and #3 for next release
> when ABI breakage would be allowed.
> BTW, good point that we need similar thing for other dev types too.
> Konstantin

My preference would be #4 or #1.
#2 and #3 are both tradeoffs and do not resolve ABI breaking completely.
#3 is really invasive, it requires changes of driverRx/Tx burst 
prototypes and
uninline descriptor status functions (may be it would be better to change
callback prototypes as well, but keep functions inline).
#4 is better since it is really a step to ABI stability and it still 
allow to
do many generic checks (dev->data dependent) on ethdev API level.

Andrew



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

* Re: [dpdk-dev] RFC: hiding struct rte_eth_dev
  2019-09-26 11:13     ` Andrew Rybchenko
@ 2019-09-26 11:50       ` David Marchand
  2019-09-26 11:52         ` David Marchand
  0 siblings, 1 reply; 8+ messages in thread
From: David Marchand @ 2019-09-26 11:50 UTC (permalink / raw)
  To: Andrew Rybchenko, Thomas Monjalon
  Cc: Ananyev, Konstantin, Jerin Jacob, Ray Kinsella, dpdk-dev,
	Richardson, Bruce, Jerin Jacob Kollanukkaran, Hemant Agrawal,
	Stephen Hemminger, Yigit, Ferruh, maxime.coquelin, Zapolski,
	MarcinX A, Ian Stokes, Ilya Maximets

On Thu, Sep 26, 2019 at 1:13 PM Andrew Rybchenko
<arybchenko@solarflare.com> wrote:
>
> On 9/24/19 7:50 PM, Ananyev, Konstantin wrote:
>
> Hi everyone,
>
> Hi folks,
>
> The ABI Stability proposals should be pretty well known at this point.
> The latest rev is here ...
>
> http://inbox.dpdk.org/dev/1565864619-17206-1-git-send-email-mdr@ashroe.eu/
>
> As has been discussed public data structure's are risky for ABI
> stability, as any changes to a data structure can change the ABI. As a
> general rule you want to expose as few as possible (ideally none), and
> keep them as small as possible.
>
> One of the key data structures in DPDK is `struct rte_eth_dev`. In this
> case, rte_eth_dev is exposed public-ally, as a side-effect of the
> inlining of the [rx,tx]_burst functions.
>
> Marcin Zapolski has been looking at what to do about it, with no current
> consensus on a path forward. The options on our table is:-
>
> 1. Do nothing, live with the risk to DPDK v20 ABI stability.
>
> 2. Pad rte_eth_dev, add some extra bytes to the structure "in case" we
> need to add a field during the v20 ABI (through to 20.11).
>
> 3. Break rte_eth_dev into public and private structs.
>   - See
> http://inbox.dpdk.org/dev/20190906131813.1343-1-marcinx.a.zapolski@intel.com/
>   - This ends up quiet an invasive patch, late in the cycle, however it
> does have no performance penalty.
>
> 4. Uninline [rx,tx]_burst functions
>  -  See
> http://inbox.dpdk.org/dev/20190730124950.1293-1-marcinx.a.zapolski@intel.com/
>  - This has a performance penalty of ~2% with testpmd, impact on a "real
> workload" is likely to be in the noise.
>
> We need to agree an approach for v19.11, and that may be we agree to do
> nothing. My personal vote is 4. as the simplest with minimal impact.
>
> My preference NOT to do #4. Reasons are:
> - I have seen performance drop from 1.5% to 3.5% based on the arm64
> cores in use(Embedded vs Server cores)
> -  We need the correct approach to cater to cryptodev and eventdev as
> well. If #4 is checked in, We will
> take shotcut for cryptodev and eventdev
>
> My preference  #1, do nothing, is probably ok and could live with #2,
> adding padding,
> and fix properly with #3 as when needed and use #3 scheme for crypto
> dev and eventdev as well.
>
>
> My preference would be #4 also.
> If that's not an option, then I suppose #1 for 19.11 and #3 for next release
> when ABI breakage would be allowed.
> BTW, good point that we need similar thing for other dev types too.
> Konstantin
>
>
> My preference would be #4 or #1.
> #2 and #3 are both tradeoffs and do not resolve ABI breaking completely.
> #3 is really invasive, it requires changes of driverRx/Tx burst prototypes and
> uninline descriptor status functions (may be it would be better to change
> callback prototypes as well, but keep functions inline).
> #4 is better since it is really a step to ABI stability and it still allow to
> do many generic checks (dev->data dependent) on ethdev API level.

Did we ensure that external users have all the required api before
hiding the rte_eth_dev struct?
ovs still accesses rte_eth_devices[].

CC Ian and Ilya.


-- 
David Marchand

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

* Re: [dpdk-dev] RFC: hiding struct rte_eth_dev
  2019-09-26 11:50       ` David Marchand
@ 2019-09-26 11:52         ` David Marchand
  0 siblings, 0 replies; 8+ messages in thread
From: David Marchand @ 2019-09-26 11:52 UTC (permalink / raw)
  To: Andrew Rybchenko, Thomas Monjalon
  Cc: Ananyev, Konstantin, Jerin Jacob, Ray Kinsella, dpdk-dev,
	Richardson, Bruce, Jerin Jacob Kollanukkaran, Hemant Agrawal,
	Stephen Hemminger, Yigit, Ferruh, maxime.coquelin, Zapolski,
	MarcinX A, Ian Stokes, Ilya Maximets

Fixed Ilya address.

On Thu, Sep 26, 2019 at 1:50 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Thu, Sep 26, 2019 at 1:13 PM Andrew Rybchenko
> <arybchenko@solarflare.com> wrote:
> >
> > On 9/24/19 7:50 PM, Ananyev, Konstantin wrote:
> >
> > Hi everyone,
> >
> > Hi folks,
> >
> > The ABI Stability proposals should be pretty well known at this point.
> > The latest rev is here ...
> >
> > http://inbox.dpdk.org/dev/1565864619-17206-1-git-send-email-mdr@ashroe.eu/
> >
> > As has been discussed public data structure's are risky for ABI
> > stability, as any changes to a data structure can change the ABI. As a
> > general rule you want to expose as few as possible (ideally none), and
> > keep them as small as possible.
> >
> > One of the key data structures in DPDK is `struct rte_eth_dev`. In this
> > case, rte_eth_dev is exposed public-ally, as a side-effect of the
> > inlining of the [rx,tx]_burst functions.
> >
> > Marcin Zapolski has been looking at what to do about it, with no current
> > consensus on a path forward. The options on our table is:-
> >
> > 1. Do nothing, live with the risk to DPDK v20 ABI stability.
> >
> > 2. Pad rte_eth_dev, add some extra bytes to the structure "in case" we
> > need to add a field during the v20 ABI (through to 20.11).
> >
> > 3. Break rte_eth_dev into public and private structs.
> >   - See
> > http://inbox.dpdk.org/dev/20190906131813.1343-1-marcinx.a.zapolski@intel.com/
> >   - This ends up quiet an invasive patch, late in the cycle, however it
> > does have no performance penalty.
> >
> > 4. Uninline [rx,tx]_burst functions
> >  -  See
> > http://inbox.dpdk.org/dev/20190730124950.1293-1-marcinx.a.zapolski@intel.com/
> >  - This has a performance penalty of ~2% with testpmd, impact on a "real
> > workload" is likely to be in the noise.
> >
> > We need to agree an approach for v19.11, and that may be we agree to do
> > nothing. My personal vote is 4. as the simplest with minimal impact.
> >
> > My preference NOT to do #4. Reasons are:
> > - I have seen performance drop from 1.5% to 3.5% based on the arm64
> > cores in use(Embedded vs Server cores)
> > -  We need the correct approach to cater to cryptodev and eventdev as
> > well. If #4 is checked in, We will
> > take shotcut for cryptodev and eventdev
> >
> > My preference  #1, do nothing, is probably ok and could live with #2,
> > adding padding,
> > and fix properly with #3 as when needed and use #3 scheme for crypto
> > dev and eventdev as well.
> >
> >
> > My preference would be #4 also.
> > If that's not an option, then I suppose #1 for 19.11 and #3 for next release
> > when ABI breakage would be allowed.
> > BTW, good point that we need similar thing for other dev types too.
> > Konstantin
> >
> >
> > My preference would be #4 or #1.
> > #2 and #3 are both tradeoffs and do not resolve ABI breaking completely.
> > #3 is really invasive, it requires changes of driverRx/Tx burst prototypes and
> > uninline descriptor status functions (may be it would be better to change
> > callback prototypes as well, but keep functions inline).
> > #4 is better since it is really a step to ABI stability and it still allow to
> > do many generic checks (dev->data dependent) on ethdev API level.
>
> Did we ensure that external users have all the required api before
> hiding the rte_eth_dev struct?
> ovs still accesses rte_eth_devices[].
>
> CC Ian and Ilya.


--
David Marchand

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

end of thread, other threads:[~2019-09-26 11:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-23 16:19 [dpdk-dev] RFC: hiding struct rte_eth_dev Ray Kinsella
2019-09-23 16:35 ` Bruce Richardson
2019-09-24  9:07 ` Morten Brørup
2019-09-24 16:42 ` Jerin Jacob
2019-09-24 16:50   ` Ananyev, Konstantin
2019-09-26 11:13     ` Andrew Rybchenko
2019-09-26 11:50       ` David Marchand
2019-09-26 11:52         ` David Marchand

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).