From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 09CD5A04B5; Tue, 27 Oct 2020 11:24:29 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D29B62BD5; Tue, 27 Oct 2020 11:24:27 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id AB31F2BD3 for ; Tue, 27 Oct 2020 11:24:24 +0100 (CET) IronPort-SDR: W4oS8Xm4XjoensEnm6zA5K6Mvv43UfDhn+OcIS31SaKMBJVugUnyGJ5BeIIzZ/ToG2zNGamSgo AHPtZI9ee41g== X-IronPort-AV: E=McAfee;i="6000,8403,9786"; a="229693458" X-IronPort-AV: E=Sophos;i="5.77,423,1596524400"; d="scan'208";a="229693458" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2020 03:24:22 -0700 IronPort-SDR: hsRhBTJzAhiXuCs2Gh6EdJF+xxV6dges67agfBIKCq27GuKpiC5zSjqZR7UudzEEVyJvtpyt5V CwJdy93tTfwQ== X-IronPort-AV: E=Sophos;i="5.77,423,1596524400"; d="scan'208";a="468246743" Received: from bricha3-mobl.ger.corp.intel.com ([10.214.252.158]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 27 Oct 2020 03:24:19 -0700 Date: Tue, 27 Oct 2020 10:24:15 +0000 From: Bruce Richardson To: Morten =?iso-8859-1?Q?Br=F8rup?= Cc: thomas@monjalon.net, ferruh.yigit@intel.com, arybchenko@solarflare.com, jia.guo@intel.com, dev@dpdk.org Message-ID: <20201027102415.GB936@bricha3-MOBL.ger.corp.intel.com> References: <20200914110511.95609-1-mb@smartsharesystems.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200914110511.95609-1-mb@smartsharesystems.com> Subject: Re: [dpdk-dev] [PATCH] ethdev: rte_eth_rx_burst() nb_pkts requirements X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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/98CBD80474FA8B44BF855DF32C47DC35C61257@smartserver.smartshare.dk/ > > Signed-off-by: Morten Brørup > --- > 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