From patchwork Fri Aug 7 09:32:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Loftus, Ciara" X-Patchwork-Id: 75273 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 AB433A04B0; Fri, 7 Aug 2020 11:56:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C90612BF2; Fri, 7 Aug 2020 11:56:26 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 81CCA2BF1; Fri, 7 Aug 2020 11:56:24 +0200 (CEST) IronPort-SDR: WjsJ08SpJZB620ZCruL059SPpOXnbwjNGjhcSXmZ7fxa4c46xhQzUu4k8Nk99+CjAZMWPTlkHc Qv99Z6SXY0Qg== X-IronPort-AV: E=McAfee;i="6000,8403,9705"; a="171112868" X-IronPort-AV: E=Sophos;i="5.75,445,1589266800"; d="scan'208";a="171112868" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2020 02:56:23 -0700 IronPort-SDR: e9bKMZlxiMjI8Q4pxaS4yg2JkE9mehQkiOSylWEvvwi2ExaQDzWhXJ5YdvTj11tcYghvw3H33U RGmtmt9BNmiA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,445,1589266800"; d="scan'208";a="367883704" Received: from silpixa00399839.ir.intel.com (HELO localhost.localdomain) ([10.237.222.116]) by orsmga001.jf.intel.com with ESMTP; 07 Aug 2020 02:56:22 -0700 From: Ciara Loftus To: dev@dpdk.org Cc: Ciara Loftus , stable@dpdk.org Date: Fri, 7 Aug 2020 09:32:48 +0000 Message-Id: <20200807093248.4295-1-ciara.loftus@intel.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] net/af_xdp: change return value from Rx to unsigned 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" The af_xdp rx function was returning a negative value on error, when an unsigned value is expected. Fix this. Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: stable@dpdk.org Signed-off-by: Ciara Loftus Acked-by: Ferruh Yigit --- drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 936d4a7d5f..7ce4ad04af 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -236,7 +236,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) if (rte_pktmbuf_alloc_bulk(umem->mb_pool, fq_bufs, nb_pkts)) { AF_XDP_LOG(DEBUG, "Failed to get enough buffers for fq.\n"); - return -1; + return 0; } rcvd = xsk_ring_cons__peek(rx, nb_pkts, &idx_rx);