From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id B02D06833; Mon, 21 Jan 2019 17:18:43 +0100 (CET) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us3.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id E4D26B40068; Mon, 21 Jan 2019 16:18:41 +0000 (UTC) Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 21 Jan 2019 08:18:38 -0800 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Mon, 21 Jan 2019 08:18:38 -0800 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id x0LGIbka029513; Mon, 21 Jan 2019 16:18:37 GMT Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 4A1F61616EF; Mon, 21 Jan 2019 16:18:37 +0000 (GMT) From: Andrew Rybchenko To: Thomas Monjalon , Ferruh Yigit CC: , Date: Mon, 21 Jan 2019 16:18:35 +0000 Message-ID: <1548087515-18823-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24378.005 X-TM-AS-Result: No-3.929400-4.000000-10 X-TMASE-MatchedRID: pOSLvdLhk0sqbMij7JXmj1z+axQLnAVB0fwi00MU0DTfUZT83lbkEAVj /b97sBMuYCR1tL+r3keiR3zpi0D0Mx8TzIzimOwPC24oEZ6SpSmcfuxsiY4QFMnieMBIQOPpoIa p+8ggqh+NbdW1MqC57U3eUq6u0tXe65yIv3QSq9YDrWcZPPcIVUhy2XCO/h1PDlgSs/CQ5BJ3BG qHKKK72eQDw6tgd3AMZ9iVj/KhX/RSnoQc5vb5zuQdkM7ndBLCYDttQUGqHZU= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--3.929400-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24378.005 X-MDID: 1548087522-0zNKuEYTcCqi Subject: [dpdk-dev] [PATCH] ethdev: fix errno to have positive value 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: , X-List-Received-Date: Mon, 21 Jan 2019 16:18:44 -0000 rte_errno should be set to positive value from errno.h plus few RTE-specific values. Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation") Fixes: 439a90b5f2a7 ("ethdev: reorder inline functions") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko --- lib/librte_ethdev/rte_ethdev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index 76266ad10..a3c864a13 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -4222,7 +4222,7 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id, #ifdef RTE_LIBRTE_ETHDEV_DEBUG if (!rte_eth_dev_is_valid_port(port_id)) { RTE_ETHDEV_LOG(ERR, "Invalid TX port_id=%u\n", port_id); - rte_errno = -EINVAL; + rte_errno = EINVAL; return 0; } #endif @@ -4232,7 +4232,7 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id, #ifdef RTE_LIBRTE_ETHDEV_DEBUG if (queue_id >= dev->data->nb_tx_queues) { RTE_ETHDEV_LOG(ERR, "Invalid TX queue_id=%u\n", queue_id); - rte_errno = -EINVAL; + rte_errno = EINVAL; return 0; } #endif -- 2.17.1