DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] doc: add preferred burst size support
@ 2018-02-01 12:44 Shreyansh Jain
  2018-02-01 12:48 ` [dpdk-dev] [PATCH v2] " Shreyansh Jain
  0 siblings, 1 reply; 12+ messages in thread
From: Shreyansh Jain @ 2018-02-01 12:44 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, thomas, matan, konstantin.ananyev, hemant.agrawal,
	Shreyansh Jain

rte_eth_rx_burst(..,nb_pkts) function has semantic that if return value
is smaller than requested, application can consider it end of packet
stream. Some hardware can only support smaller burst sizes which need
to be advertised. Similar is the case for Tx burst.

This patch adds deprecation notice for rte_eth_dev_info structure as
two new members, for preferred Rx and Tx burst size would be added -
impacting the size of the structure.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
* Refer: http://dpdk.org/dev/patchwork/patch/32112 for context

 doc/guides/rel_notes/deprecation.rst | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index d59ad5988..575c5e770 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -59,3 +59,11 @@ Deprecation Notices
   be added between the producer and consumer structures. The size of the
   structure and the offset of the fields will remain the same on
   platforms with 64B cache line, but will change on other platforms.
+
+* ethdev:  Currently, if the  rte_eth_rx_burst() function returns a value less
+  than *nb_pkts*, the application will assume that no more packets are present.
+  Some of the hw queue based hardware can only support smaller burst for RX
+  and TX and thus break the expectation of the rx_burst API. Similar is the
+  case for TX burst. ``rte_eth_dev_info`` will be added with two new
+  paramaters, ``uint16_t pref_rx_burst`` and ``uint16_t pref_tx_burst``,
+  for preferred RX and TX burst sizes, respectively.
-- 
2.14.1

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

* [dpdk-dev] [PATCH v2] doc: add preferred burst size support
  2018-02-01 12:44 [dpdk-dev] [PATCH] doc: add preferred burst size support Shreyansh Jain
@ 2018-02-01 12:48 ` Shreyansh Jain
  2018-02-01 12:52   ` Hemant Agrawal
                     ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Shreyansh Jain @ 2018-02-01 12:48 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, thomas, matan, konstantin.ananyev, hemant.agrawal,
	Shreyansh Jain

rte_eth_rx_burst(..,nb_pkts) function has semantic that if return value
is smaller than requested, application can consider it end of packet
stream. Some hardware can only support smaller burst sizes which need
to be advertised. Similar is the case for Tx burst.

This patch adds deprecation notice for rte_eth_dev_info structure as
two new members, for preferred Rx and Tx burst size would be added -
impacting the size of the structure.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
* Refer: http://dpdk.org/dev/patchwork/patch/32112 for context

v2:
 - fix spelling error in deprecation notice

 doc/guides/rel_notes/deprecation.rst | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index d59ad5988..fdc7656fa 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -59,3 +59,11 @@ Deprecation Notices
   be added between the producer and consumer structures. The size of the
   structure and the offset of the fields will remain the same on
   platforms with 64B cache line, but will change on other platforms.
+
+* ethdev:  Currently, if the  rte_eth_rx_burst() function returns a value less
+  than *nb_pkts*, the application will assume that no more packets are present.
+  Some of the hw queue based hardware can only support smaller burst for RX
+  and TX and thus break the expectation of the rx_burst API. Similar is the
+  case for TX burst. ``rte_eth_dev_info`` will be added with two new
+  parameters, ``uint16_t pref_rx_burst`` and ``uint16_t pref_tx_burst``,
+  for preferred RX and TX burst sizes, respectively.
-- 
2.14.1

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

* Re: [dpdk-dev] [PATCH v2] doc: add preferred burst size support
  2018-02-01 12:48 ` [dpdk-dev] [PATCH v2] " Shreyansh Jain
@ 2018-02-01 12:52   ` Hemant Agrawal
  2018-02-01 12:52   ` Andrew Rybchenko
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 12+ messages in thread
From: Hemant Agrawal @ 2018-02-01 12:52 UTC (permalink / raw)
  To: Shreyansh Jain, dev; +Cc: ferruh.yigit, thomas, matan, konstantin.ananyev

On 2/1/2018 6:18 PM, Shreyansh Jain wrote:
> rte_eth_rx_burst(..,nb_pkts) function has semantic that if return value
> is smaller than requested, application can consider it end of packet
> stream. Some hardware can only support smaller burst sizes which need
> to be advertised. Similar is the case for Tx burst.
> 
> This patch adds deprecation notice for rte_eth_dev_info structure as
> two new members, for preferred Rx and Tx burst size would be added -
> impacting the size of the structure.
> 
> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
<snip>...

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

* Re: [dpdk-dev] [PATCH v2] doc: add preferred burst size support
  2018-02-01 12:48 ` [dpdk-dev] [PATCH v2] " Shreyansh Jain
  2018-02-01 12:52   ` Hemant Agrawal
@ 2018-02-01 12:52   ` Andrew Rybchenko
  2018-02-01 13:27   ` Bruce Richardson
  2018-02-05  6:22   ` [dpdk-dev] [PATCH v3] " Shreyansh Jain
  3 siblings, 0 replies; 12+ messages in thread
From: Andrew Rybchenko @ 2018-02-01 12:52 UTC (permalink / raw)
  To: Shreyansh Jain, dev
  Cc: ferruh.yigit, thomas, matan, konstantin.ananyev, hemant.agrawal

On 02/01/2018 03:48 PM, Shreyansh Jain wrote:
> rte_eth_rx_burst(..,nb_pkts) function has semantic that if return value
> is smaller than requested, application can consider it end of packet
> stream. Some hardware can only support smaller burst sizes which need
> to be advertised. Similar is the case for Tx burst.
>
> This patch adds deprecation notice for rte_eth_dev_info structure as
> two new members, for preferred Rx and Tx burst size would be added -
> impacting the size of the structure.
>
> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
> ---
> * Refer: http://dpdk.org/dev/patchwork/patch/32112 for context
>
> v2:
>   - fix spelling error in deprecation notice
>
>   doc/guides/rel_notes/deprecation.rst | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index d59ad5988..fdc7656fa 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -59,3 +59,11 @@ Deprecation Notices
>     be added between the producer and consumer structures. The size of the
>     structure and the offset of the fields will remain the same on
>     platforms with 64B cache line, but will change on other platforms.
> +
> +* ethdev:  Currently, if the  rte_eth_rx_burst() function returns a value less
> +  than *nb_pkts*, the application will assume that no more packets are present.
> +  Some of the hw queue based hardware can only support smaller burst for RX
> +  and TX and thus break the expectation of the rx_burst API. Similar is the
> +  case for TX burst. ``rte_eth_dev_info`` will be added with two new
> +  parameters, ``uint16_t pref_rx_burst`` and ``uint16_t pref_tx_burst``,
> +  for preferred RX and TX burst sizes, respectively.

Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* Re: [dpdk-dev] [PATCH v2] doc: add preferred burst size support
  2018-02-01 12:48 ` [dpdk-dev] [PATCH v2] " Shreyansh Jain
  2018-02-01 12:52   ` Hemant Agrawal
  2018-02-01 12:52   ` Andrew Rybchenko
@ 2018-02-01 13:27   ` Bruce Richardson
  2018-02-01 14:28     ` Shreyansh Jain
  2018-02-05  6:22   ` [dpdk-dev] [PATCH v3] " Shreyansh Jain
  3 siblings, 1 reply; 12+ messages in thread
From: Bruce Richardson @ 2018-02-01 13:27 UTC (permalink / raw)
  To: Shreyansh Jain
  Cc: dev, ferruh.yigit, thomas, matan, konstantin.ananyev, hemant.agrawal

On Thu, Feb 01, 2018 at 06:18:23PM +0530, Shreyansh Jain wrote:
> rte_eth_rx_burst(..,nb_pkts) function has semantic that if return value
> is smaller than requested, application can consider it end of packet
> stream. Some hardware can only support smaller burst sizes which need
> to be advertised. Similar is the case for Tx burst.
> 
> This patch adds deprecation notice for rte_eth_dev_info structure as
> two new members, for preferred Rx and Tx burst size would be added -
> impacting the size of the structure.
> 
> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
> ---
> * Refer: http://dpdk.org/dev/patchwork/patch/32112 for context
> 
> v2:
>  - fix spelling error in deprecation notice
> 
>  doc/guides/rel_notes/deprecation.rst | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index d59ad5988..fdc7656fa 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -59,3 +59,11 @@ Deprecation Notices
>    be added between the producer and consumer structures. The size of the
>    structure and the offset of the fields will remain the same on
>    platforms with 64B cache line, but will change on other platforms.
> +
> +* ethdev:  Currently, if the  rte_eth_rx_burst() function returns a value less
> +  than *nb_pkts*, the application will assume that no more packets are present.
> +  Some of the hw queue based hardware can only support smaller burst for RX
> +  and TX and thus break the expectation of the rx_burst API. Similar is the
> +  case for TX burst. ``rte_eth_dev_info`` will be added with two new
> +  parameters, ``uint16_t pref_rx_burst`` and ``uint16_t pref_tx_burst``,
> +  for preferred RX and TX burst sizes, respectively.
> -- 
> 2.14.1
>

LTGM as far as it goes, but following discussion on this patch, 
http://dpdk.org/ml/archives/dev/2018-January/089585.html
I think we might also want to add in parameters for "pref_tx_ring_sz"
and "pref_rx_ring_sz" too. While it is the case that, once the structure
is changed, we can make multiple additional changes, I think it might be
worth mentioning as many as we can for completeness.

Another point to consider, is whether we might want to add in a
sub-structure for "preferred_settings" to hold all these, rather than
just adding them as new fields. It might help with making names more
readable (though also longer).

	struct {
		uint16_t rx_burst;
		uint16_t tx_burst;
		uint16_t rx_ring_sz;
		uint16_t tx_ring_sz;
	} preferred_settings;

In any case, for this or subsequent versions:

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

/Bruce

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

* Re: [dpdk-dev] [PATCH v2] doc: add preferred burst size support
  2018-02-01 14:28     ` Shreyansh Jain
@ 2018-02-01 14:19       ` Bruce Richardson
  2018-02-05  5:39         ` Shreyansh Jain
  0 siblings, 1 reply; 12+ messages in thread
From: Bruce Richardson @ 2018-02-01 14:19 UTC (permalink / raw)
  To: Shreyansh Jain
  Cc: dev, ferruh.yigit, thomas, matan, konstantin.ananyev, hemant.agrawal

On Thu, Feb 01, 2018 at 07:58:32PM +0530, Shreyansh Jain wrote:
> On Thursday 01 February 2018 06:57 PM, Bruce Richardson wrote:
> > On Thu, Feb 01, 2018 at 06:18:23PM +0530, Shreyansh Jain wrote:
> > > rte_eth_rx_burst(..,nb_pkts) function has semantic that if return value
> > > is smaller than requested, application can consider it end of packet
> > > stream. Some hardware can only support smaller burst sizes which need
> > > to be advertised. Similar is the case for Tx burst.
> > > 
> > > This patch adds deprecation notice for rte_eth_dev_info structure as
> > > two new members, for preferred Rx and Tx burst size would be added -
> > > impacting the size of the structure.
> > > 
> > > Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
> > > ---
> > > * Refer: http://dpdk.org/dev/patchwork/patch/32112 for context
> > > 
> > > v2:
> > >   - fix spelling error in deprecation notice
> > > 
> > >   doc/guides/rel_notes/deprecation.rst | 8 ++++++++
> > >   1 file changed, 8 insertions(+)
> > > 
> > > diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> > > index d59ad5988..fdc7656fa 100644
> > > --- a/doc/guides/rel_notes/deprecation.rst
> > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > @@ -59,3 +59,11 @@ Deprecation Notices
> > >     be added between the producer and consumer structures. The size of the
> > >     structure and the offset of the fields will remain the same on
> > >     platforms with 64B cache line, but will change on other platforms.
> > > +
> > > +* ethdev:  Currently, if the  rte_eth_rx_burst() function returns a value less
> > > +  than *nb_pkts*, the application will assume that no more packets are present.
> > > +  Some of the hw queue based hardware can only support smaller burst for RX
> > > +  and TX and thus break the expectation of the rx_burst API. Similar is the
> > > +  case for TX burst. ``rte_eth_dev_info`` will be added with two new
> > > +  parameters, ``uint16_t pref_rx_burst`` and ``uint16_t pref_tx_burst``,
> > > +  for preferred RX and TX burst sizes, respectively.
> > > -- 
> > > 2.14.1
> > > 
> > 
> > LTGM as far as it goes, but following discussion on this patch,
> > http://dpdk.org/ml/archives/dev/2018-January/089585.html
> > I think we might also want to add in parameters for "pref_tx_ring_sz"
> > and "pref_rx_ring_sz" too. While it is the case that, once the structure
> > is changed, we can make multiple additional changes, I think it might be
> > worth mentioning as many as we can for completeness.
> > 
> > Another point to consider, is whether we might want to add in a
> > sub-structure for "preferred_settings" to hold all these, rather than
> > just adding them as new fields. It might help with making names more
> > readable (though also longer).
> > 
> > 	struct {
> > 		uint16_t rx_burst;
> > 		uint16_t tx_burst;
> > 		uint16_t rx_ring_sz;
> > 		uint16_t tx_ring_sz;
> > 	} preferred_settings;
> 
> This, and the point above that we can make multiple additional changes, is
> definitely a good idea. Though, 'preferred_setting' is long and has chances
> of spell mistakes in first go - what about just 'pref' or, 'pref_size' if
> only 4 mentioned above are part of this.
> 
> For now I saw need for burst size because I hit that case. Ring size looks
> logical to me. We can have a look if more such toggles are required.
> 

I actually don't like the abbreviation "pref", as it looks too much like
"perf" short for performance. As this is an initialization setting, I
also don't think having a longer name is that big of deal. How about
calling them "suggested" or "recommended" settings - both of which have
less fiddly spellings.

/Bruce

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

* Re: [dpdk-dev] [PATCH v2] doc: add preferred burst size support
  2018-02-01 13:27   ` Bruce Richardson
@ 2018-02-01 14:28     ` Shreyansh Jain
  2018-02-01 14:19       ` Bruce Richardson
  0 siblings, 1 reply; 12+ messages in thread
From: Shreyansh Jain @ 2018-02-01 14:28 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: dev, ferruh.yigit, thomas, matan, konstantin.ananyev, hemant.agrawal

On Thursday 01 February 2018 06:57 PM, Bruce Richardson wrote:
> On Thu, Feb 01, 2018 at 06:18:23PM +0530, Shreyansh Jain wrote:
>> rte_eth_rx_burst(..,nb_pkts) function has semantic that if return value
>> is smaller than requested, application can consider it end of packet
>> stream. Some hardware can only support smaller burst sizes which need
>> to be advertised. Similar is the case for Tx burst.
>>
>> This patch adds deprecation notice for rte_eth_dev_info structure as
>> two new members, for preferred Rx and Tx burst size would be added -
>> impacting the size of the structure.
>>
>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
>> ---
>> * Refer: http://dpdk.org/dev/patchwork/patch/32112 for context
>>
>> v2:
>>   - fix spelling error in deprecation notice
>>
>>   doc/guides/rel_notes/deprecation.rst | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
>> index d59ad5988..fdc7656fa 100644
>> --- a/doc/guides/rel_notes/deprecation.rst
>> +++ b/doc/guides/rel_notes/deprecation.rst
>> @@ -59,3 +59,11 @@ Deprecation Notices
>>     be added between the producer and consumer structures. The size of the
>>     structure and the offset of the fields will remain the same on
>>     platforms with 64B cache line, but will change on other platforms.
>> +
>> +* ethdev:  Currently, if the  rte_eth_rx_burst() function returns a value less
>> +  than *nb_pkts*, the application will assume that no more packets are present.
>> +  Some of the hw queue based hardware can only support smaller burst for RX
>> +  and TX and thus break the expectation of the rx_burst API. Similar is the
>> +  case for TX burst. ``rte_eth_dev_info`` will be added with two new
>> +  parameters, ``uint16_t pref_rx_burst`` and ``uint16_t pref_tx_burst``,
>> +  for preferred RX and TX burst sizes, respectively.
>> -- 
>> 2.14.1
>>
> 
> LTGM as far as it goes, but following discussion on this patch,
> http://dpdk.org/ml/archives/dev/2018-January/089585.html
> I think we might also want to add in parameters for "pref_tx_ring_sz"
> and "pref_rx_ring_sz" too. While it is the case that, once the structure
> is changed, we can make multiple additional changes, I think it might be
> worth mentioning as many as we can for completeness.
> 
> Another point to consider, is whether we might want to add in a
> sub-structure for "preferred_settings" to hold all these, rather than
> just adding them as new fields. It might help with making names more
> readable (though also longer).
> 
> 	struct {
> 		uint16_t rx_burst;
> 		uint16_t tx_burst;
> 		uint16_t rx_ring_sz;
> 		uint16_t tx_ring_sz;
> 	} preferred_settings;

This, and the point above that we can make multiple additional changes, 
is definitely a good idea. Though, 'preferred_setting' is long and has 
chances of spell mistakes in first go - what about just 'pref' or, 
'pref_size' if only 4 mentioned above are part of this.

For now I saw need for burst size because I hit that case. Ring size 
looks logical to me. We can have a look if more such toggles are required.

> 
> In any case, for this or subsequent versions:
> 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> /Bruce
> 

Thanks.

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

* Re: [dpdk-dev] [PATCH v2] doc: add preferred burst size support
  2018-02-01 14:19       ` Bruce Richardson
@ 2018-02-05  5:39         ` Shreyansh Jain
  0 siblings, 0 replies; 12+ messages in thread
From: Shreyansh Jain @ 2018-02-05  5:39 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: dev, ferruh.yigit, thomas, matan, konstantin.ananyev, hemant.agrawal

Hi Bruce,

On Thursday 01 February 2018 07:49 PM, Bruce Richardson wrote:
> On Thu, Feb 01, 2018 at 07:58:32PM +0530, Shreyansh Jain wrote:
>> On Thursday 01 February 2018 06:57 PM, Bruce Richardson wrote:
>>> On Thu, Feb 01, 2018 at 06:18:23PM +0530, Shreyansh Jain wrote:
>>>> rte_eth_rx_burst(..,nb_pkts) function has semantic that if return value
>>>> is smaller than requested, application can consider it end of packet
>>>> stream. Some hardware can only support smaller burst sizes which need
>>>> to be advertised. Similar is the case for Tx burst.
>>>>
>>>> This patch adds deprecation notice for rte_eth_dev_info structure as
>>>> two new members, for preferred Rx and Tx burst size would be added -
>>>> impacting the size of the structure.
>>>>
>>>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
>>>> ---

[...]

>>>
>>> LTGM as far as it goes, but following discussion on this patch,
>>> http://dpdk.org/ml/archives/dev/2018-January/089585.html
>>> I think we might also want to add in parameters for "pref_tx_ring_sz"
>>> and "pref_rx_ring_sz" too. While it is the case that, once the structure
>>> is changed, we can make multiple additional changes, I think it might be
>>> worth mentioning as many as we can for completeness.
>>>
>>> Another point to consider, is whether we might want to add in a
>>> sub-structure for "preferred_settings" to hold all these, rather than
>>> just adding them as new fields. It might help with making names more
>>> readable (though also longer).
>>>
>>> 	struct {
>>> 		uint16_t rx_burst;
>>> 		uint16_t tx_burst;
>>> 		uint16_t rx_ring_sz;
>>> 		uint16_t tx_ring_sz;
>>> 	} preferred_settings;
>>
>> This, and the point above that we can make multiple additional changes, is
>> definitely a good idea. Though, 'preferred_setting' is long and has chances
>> of spell mistakes in first go - what about just 'pref' or, 'pref_size' if
>> only 4 mentioned above are part of this.
>>
>> For now I saw need for burst size because I hit that case. Ring size looks
>> logical to me. We can have a look if more such toggles are required.
>>
> 
> I actually don't like the abbreviation "pref", as it looks too much like
> "perf" short for performance. As this is an initialization setting, I
> also don't think having a longer name is that big of deal. How about
> calling them "suggested" or "recommended" settings - both of which have
> less fiddly spellings.
> 
> /Bruce
> 

I get your point and on a second thought even I think 'preferred_*' is 
better than other options (including mine). Only change I will do is 
change to 'preferred_size' as all members are size only:

         struct {
                 uint16_t rx_burst; /*< Rx Burst size */
                 uint16_t tx_burst; /*< Tx Burst size */
                 uint16_t rx_ring;  /*< Rx ring size */
                 uint16_t tx_ring;  /*< Tx ring size */
         } preferred_size;

I will use your ACK but if you have objections to focusing on size only 
in this structure - let me know. I will send across another patch and 
put it as 'preferred_settings' and then we can discuss the naming during 
implementation.

-
Shreyansh

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

* Re: [dpdk-dev] [PATCH v3] doc: add preferred burst size support
  2018-02-05  6:22   ` [dpdk-dev] [PATCH v3] " Shreyansh Jain
@ 2018-02-05  6:17     ` Yang, Zhiyong
  2018-02-13 23:55       ` Thomas Monjalon
  0 siblings, 1 reply; 12+ messages in thread
From: Yang, Zhiyong @ 2018-02-05  6:17 UTC (permalink / raw)
  To: Shreyansh Jain, dev
  Cc: Yigit, Ferruh, thomas, Richardson, Bruce, Ananyev, Konstantin,
	hemant.agrawal, matan



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shreyansh Jain
> Sent: Monday, February 5, 2018 2:22 PM
> To: dev@dpdk.org
> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; thomas@monjalon.net;
> Richardson, Bruce <bruce.richardson@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; hemant.agrawal@nxp.com;
> matan@mellanox.com; Shreyansh Jain <shreyansh.jain@nxp.com>
> Subject: [dpdk-dev] [PATCH v3] doc: add preferred burst size support
> 
> rte_eth_rx_burst(..,nb_pkts) function has semantic that if return value is
> smaller than requested, application can consider it end of packet stream.
> Some hardware can only support smaller burst sizes which need to be
> advertised. Similar is the case for Tx burst.
> 
> This patch adds deprecation notice for rte_eth_dev_info structure as new
> members, for preferred Rx and Tx burst and ring size would be added -
> impacting the size of the structure.
> 
> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> ---

Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>

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

* [dpdk-dev] [PATCH v3] doc: add preferred burst size support
  2018-02-01 12:48 ` [dpdk-dev] [PATCH v2] " Shreyansh Jain
                     ` (2 preceding siblings ...)
  2018-02-01 13:27   ` Bruce Richardson
@ 2018-02-05  6:22   ` Shreyansh Jain
  2018-02-05  6:17     ` Yang, Zhiyong
  3 siblings, 1 reply; 12+ messages in thread
From: Shreyansh Jain @ 2018-02-05  6:22 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, thomas, bruce.richardson, konstantin.ananyev,
	hemant.agrawal, matan, Shreyansh Jain

rte_eth_rx_burst(..,nb_pkts) function has semantic that if return value
is smaller than requested, application can consider it end of packet
stream. Some hardware can only support smaller burst sizes which need
to be advertised. Similar is the case for Tx burst.

This patch adds deprecation notice for rte_eth_dev_info structure as
new members, for preferred Rx and Tx burst and ring size would be
added - impacting the size of the structure.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
v3:
 Modification to deprecation notice to add ring size as member

v2:
 Spell check

 doc/guides/rel_notes/deprecation.rst | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index d59ad5988..91de3c62c 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -59,3 +59,16 @@ Deprecation Notices
   be added between the producer and consumer structures. The size of the
   structure and the offset of the fields will remain the same on
   platforms with 64B cache line, but will change on other platforms.
+
+* ethdev:  Currently, if the  rte_eth_rx_burst() function returns a value less
+  than *nb_pkts*, the application will assume that no more packets are present.
+  Some of the hw queue based hardware can only support smaller burst for RX
+  and TX and thus break the expectation of the rx_burst API. Similar is the
+  case for TX burst as well as ring sizes. ``rte_eth_dev_info`` will be added
+  with following new parameters so as to support semantics for drivers to
+  define a preferred size for Rx/Tx burst and rings.
+
+  - Member ``struct preferred_size`` would be added to enclose all preferred
+    size to be fetched from driver/implementation.
+  - Members ``uint16_t rx_burst``,  ``uint16_t tx_burst``, ``uint16_t rx_ring``,
+    and ``uint16_t tx_ring`` would be added to ``struct preferred_size``.
-- 
2.14.1

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

* Re: [dpdk-dev] [PATCH v3] doc: add preferred burst size support
  2018-02-05  6:17     ` Yang, Zhiyong
@ 2018-02-13 23:55       ` Thomas Monjalon
  2018-02-14 16:31         ` Thomas Monjalon
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Monjalon @ 2018-02-13 23:55 UTC (permalink / raw)
  To: Shreyansh Jain
  Cc: dev, Yang, Zhiyong, Yigit, Ferruh, Richardson, Bruce, Ananyev,
	Konstantin, hemant.agrawal, matan

05/02/2018 07:17, Yang, Zhiyong:
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shreyansh Jain
> > Sent: Monday, February 5, 2018 2:22 PM
> > To: dev@dpdk.org
> > Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; thomas@monjalon.net;
> > Richardson, Bruce <bruce.richardson@intel.com>; Ananyev, Konstantin
> > <konstantin.ananyev@intel.com>; hemant.agrawal@nxp.com;
> > matan@mellanox.com; Shreyansh Jain <shreyansh.jain@nxp.com>
> > Subject: [dpdk-dev] [PATCH v3] doc: add preferred burst size support
> > 
> > rte_eth_rx_burst(..,nb_pkts) function has semantic that if return value is
> > smaller than requested, application can consider it end of packet stream.
> > Some hardware can only support smaller burst sizes which need to be
> > advertised. Similar is the case for Tx burst.
> > 
> > This patch adds deprecation notice for rte_eth_dev_info structure as new
> > members, for preferred Rx and Tx burst and ring size would be added -
> > impacting the size of the structure.
> > 
> > Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
> > Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> > Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> > Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> 
> Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>

Maybe that we want to re-use the same struct to define min, max
and preferred sizes.

For the global idea,
Acked-by: Thomas Monjalon <thomas@monjalon.net>

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

* Re: [dpdk-dev] [PATCH v3] doc: add preferred burst size support
  2018-02-13 23:55       ` Thomas Monjalon
@ 2018-02-14 16:31         ` Thomas Monjalon
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2018-02-14 16:31 UTC (permalink / raw)
  To: Shreyansh Jain
  Cc: dev, Yang, Zhiyong, Yigit, Ferruh, Richardson, Bruce, Ananyev,
	Konstantin, hemant.agrawal, matan

> > > rte_eth_rx_burst(..,nb_pkts) function has semantic that if return value is
> > > smaller than requested, application can consider it end of packet stream.
> > > Some hardware can only support smaller burst sizes which need to be
> > > advertised. Similar is the case for Tx burst.
> > > 
> > > This patch adds deprecation notice for rte_eth_dev_info structure as new
> > > members, for preferred Rx and Tx burst and ring size would be added -
> > > impacting the size of the structure.
> > > 
> > > Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
> > > Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> > > Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> > > Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> > 
> > Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>
> 
> Maybe that we want to re-use the same struct to define min, max
> and preferred sizes.
> 
> For the global idea,
> Acked-by: Thomas Monjalon <thomas@monjalon.net>

Applied

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

end of thread, other threads:[~2018-02-14 16:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-01 12:44 [dpdk-dev] [PATCH] doc: add preferred burst size support Shreyansh Jain
2018-02-01 12:48 ` [dpdk-dev] [PATCH v2] " Shreyansh Jain
2018-02-01 12:52   ` Hemant Agrawal
2018-02-01 12:52   ` Andrew Rybchenko
2018-02-01 13:27   ` Bruce Richardson
2018-02-01 14:28     ` Shreyansh Jain
2018-02-01 14:19       ` Bruce Richardson
2018-02-05  5:39         ` Shreyansh Jain
2018-02-05  6:22   ` [dpdk-dev] [PATCH v3] " Shreyansh Jain
2018-02-05  6:17     ` Yang, Zhiyong
2018-02-13 23:55       ` Thomas Monjalon
2018-02-14 16:31         ` Thomas Monjalon

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