[dpdk-dev,v3] doc: add preferred burst size support

Message ID 20180205062222.27522-1-shreyansh.jain@nxp.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Shreyansh Jain Feb. 5, 2018, 6:22 a.m. UTC
  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(+)
  

Comments

Yang, Zhiyong Feb. 5, 2018, 6:17 a.m. UTC | #1
> -----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>
  
Thomas Monjalon Feb. 13, 2018, 11:55 p.m. UTC | #2
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>
  
Thomas Monjalon Feb. 14, 2018, 4:31 p.m. UTC | #3
> > > 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
  

Patch

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