On 10/27/2020 10:24 AM, Bruce Richardson wrote:
On Mon, Sep 14, 2020 at 01:05:11PM +0200, Morten Brørup wrote:
Updated description of rte_eth_rx_burst() to reflect what drivers,
when using vector instructions, expect from nb_pkts.

Also discussed on the mailing list here:
http://inbox.dpdk.org/dev/98cbd80474fa8b44bf855df32c47dc35c61...@smartserver.smartshare.dk/

Signed-off-by: Morten Brørup <m...@smartsharesystems.com>
---
  lib/librte_ethdev/rte_ethdev.h | 5 +++++
  1 file changed, 5 insertions(+)

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 70295d7ab..41f8ba4ef 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -4469,6 +4469,10 @@ int rte_eth_dev_hairpin_capability_get(uint16_t port_id,
   * burst-oriented optimizations in both synchronous and asynchronous
   * packet processing environments with no overhead in both cases.
   *
+ * @note
+ *   Some drivers using vector instructions require that *nb_pkts* is
+ *   divisible by 4 or 8, depending on the driver implementation.
+ *
   * The rte_eth_rx_burst() function does not provide any error
   * notification to avoid the corresponding overhead. As a hint, the
   * upper-level application might check the status of the device link once
@@ -4485,6 +4489,7 @@ int rte_eth_dev_hairpin_capability_get(uint16_t port_id,
   *   must be large enough to store *nb_pkts* pointers in it.
   * @param nb_pkts
   *   The maximum number of packets to retrieve.
+ *   The value must be divisible by 8 in order to work with any driver.
   * @return
   *   The number of packets actually retrieved, which is the number
   *   of pointers to *rte_mbuf* structures effectively supplied to the
--

This correctly documents the current situation, so following the discussion
on-list:

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


Applied to dpdk-next-net/main, thanks.

Reply via email to