From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 470D4A0096 for ; Wed, 5 Jun 2019 10:16:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7F8731B9CD; Wed, 5 Jun 2019 10:16:55 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 00C331B9C5; Wed, 5 Jun 2019 10:16:52 +0200 (CEST) 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-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 208AA1400B1; Wed, 5 Jun 2019 08:16:52 +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; Wed, 5 Jun 2019 01:16:49 -0700 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; Wed, 5 Jun 2019 01:16:49 -0700 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 x558GmDw008185; Wed, 5 Jun 2019 09:16:48 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 19D8016353B; Wed, 5 Jun 2019 09:16:48 +0100 (BST) From: Andrew Rybchenko To: Wenzhuo Lu CC: , Date: Wed, 5 Jun 2019 09:15:56 +0100 Message-ID: <1559722565-25992-4-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1559722565-25992-1-git-send-email-arybchenko@solarflare.com> References: <1559722565-25992-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24658.005 X-TM-AS-Result: No-6.160400-4.000000-10 X-TMASE-MatchedRID: ZA2hMjGumYK+G6+qk5Nchm6HurDH4PpPeouvej40T4gGmHr1eMxt2UAc 6DyoS2rI8DRYXhYkzdm3ZmfrePLDUH7savaFQtEKPaBTJyy84wV/64NkLyMdN6jxqhyDxmYjXE5 PH2yy3/i6GgMSFVVPOIAy6p60ZV62G2i4y8P2xXndB/CxWTRRu4as+d5/8j560iP835GwRC+RMj F0iIf6PPC87MIJrGtbnT5VIa/Tf4VW4YAcfB4u2w== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--6.160400-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24658.005 X-MDID: 1559722612-JE4WubUODolK Subject: [dpdk-dev] [PATCH 03/11] net/e1000: fix Tx prepare to set positive rte_errno 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" Fixes: 2b76648872c9 ("net/e1000: add Tx preparation") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko --- drivers/net/e1000/em_rxtx.c | 6 +++--- drivers/net/e1000/igb_rxtx.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c index 482d884..708f832 100644 --- a/drivers/net/e1000/em_rxtx.c +++ b/drivers/net/e1000/em_rxtx.c @@ -616,20 +616,20 @@ struct em_tx_queue { m = tx_pkts[i]; if (m->ol_flags & E1000_TX_OFFLOAD_NOTSUP_MASK) { - rte_errno = -ENOTSUP; + rte_errno = ENOTSUP; return i; } #ifdef RTE_LIBRTE_ETHDEV_DEBUG ret = rte_validate_tx_offload(m); if (ret != 0) { - rte_errno = ret; + rte_errno = -ret; return i; } #endif ret = rte_net_intel_cksum_prepare(m); if (ret != 0) { - rte_errno = ret; + rte_errno = -ret; return i; } } diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c index 871b5f3..c5606de 100644 --- a/drivers/net/e1000/igb_rxtx.c +++ b/drivers/net/e1000/igb_rxtx.c @@ -632,25 +632,25 @@ struct igb_tx_queue { if ((m->tso_segsz > IGB_TSO_MAX_MSS) || (m->l2_len + m->l3_len + m->l4_len > IGB_TSO_MAX_HDRLEN)) { - rte_errno = -EINVAL; + rte_errno = EINVAL; return i; } if (m->ol_flags & IGB_TX_OFFLOAD_NOTSUP_MASK) { - rte_errno = -ENOTSUP; + rte_errno = ENOTSUP; return i; } #ifdef RTE_LIBRTE_ETHDEV_DEBUG ret = rte_validate_tx_offload(m); if (ret != 0) { - rte_errno = ret; + rte_errno = -ret; return i; } #endif ret = rte_net_intel_cksum_prepare(m); if (ret != 0) { - rte_errno = ret; + rte_errno = -ret; return i; } } -- 1.8.3.1