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 21739A0096 for ; Wed, 5 Jun 2019 10:18:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 186651B9FB; Wed, 5 Jun 2019 10:17:09 +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 3DE781B9CB; Wed, 5 Jun 2019 10:16:54 +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 94B7414005C; Wed, 5 Jun 2019 08:16:53 +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:50 -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 x558GmVY008210; 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 8DAD516353B; Wed, 5 Jun 2019 09:16:48 +0100 (BST) From: Andrew Rybchenko To: Yong Wang CC: , Date: Wed, 5 Jun 2019 09:16:04 +0100 Message-ID: <1559722565-25992-12-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-3.048700-4.000000-10 X-TMASE-MatchedRID: KMEDr9hDKk++G6+qk5Nchm6HurDH4PpPeouvej40T4gHZBaLwEXlKGlF 7OhYLlctM76Q07LTTp51cmyURaUnr37savaFQtEKPaBTJyy84wV9LQinZ4QefPcjNeVeWlqY+gt Hj7OwNO3ClX+2r3j3WGR7+81oDwiePxGLSmSHoshFsjM5dp8BNHrGnDsYfc+w+LYZ2JoWA8kFXC 1I+YR19NTPGTFm4rxMmkUc4kS4LqguC2EpPQZog9pAu0sLxpSoQ8G+yYJYYdZRZDsGiXQioL4jx KnHJRLcwL6SxPpr1/I= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--3.048700-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24658.005 X-MDID: 1559722614-iHrlrsvN4MZz Subject: [dpdk-dev] [PATCH 11/11] net/vmxnet3: 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: baf3bbae5556 ("net/vmxnet3: add Tx preparation") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko --- drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c index 6644cde..7794d74 100644 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c @@ -361,7 +361,7 @@ */ if ((ol_flags & PKT_TX_TCP_SEG) == 0 && m->nb_segs > VMXNET3_MAX_TXD_PER_PKT) { - rte_errno = -EINVAL; + rte_errno = EINVAL; return i; } @@ -369,20 +369,20 @@ if ((ol_flags & VMXNET3_TX_OFFLOAD_NOTSUP_MASK) != 0 || (ol_flags & PKT_TX_L4_MASK) == PKT_TX_SCTP_CKSUM) { - 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