From patchwork Mon Sep 14 11:05:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Morten_Br=C3=B8rup?= X-Patchwork-Id: 77598 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 22147A04C9; Mon, 14 Sep 2020 13:05:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 99AB2FFA; Mon, 14 Sep 2020 13:05:18 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by dpdk.org (Postfix) with ESMTP id 0CDCB160 for ; Mon, 14 Sep 2020 13:05:17 +0200 (CEST) Received: from dkrd2.smartsharesys.local ([192.168.4.12]) by smartserver.smartsharesystems.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 14 Sep 2020 13:05:14 +0200 From: =?utf-8?q?Morten_Br=C3=B8rup?= To: thomas@monjalon.net, ferruh.yigit@intel.com, arybchenko@solarflare.com, bruce.richardson@intel.com Cc: jia.guo@intel.com, dev@dpdk.org, =?utf-8?q?Morten_Br=C3=B8rup?= Date: Mon, 14 Sep 2020 13:05:11 +0200 Message-Id: <20200914110511.95609-1-mb@smartsharesystems.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-OriginalArrivalTime: 14 Sep 2020 11:05:14.0420 (UTC) FILETIME=[EC07E740:01D68A86] Subject: [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" 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 Acked-by: Ajit Khaparde Acked-by: Bruce Richardson --- 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