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 E59E6A0096 for ; Wed, 5 Jun 2019 10:18:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 01F1A1BA42; Wed, 5 Jun 2019 10:17:11 +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 60B541B9CD; 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 695C814005C; 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 x558Gm8r008207; 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 7EDBE1616E0; Wed, 5 Jun 2019 09:16:48 +0100 (BST) From: Andrew Rybchenko To: Rasesh Mody , Shahed Shaikh CC: , Date: Wed, 5 Jun 2019 09:16:03 +0100 Message-ID: <1559722565-25992-11-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-0.426700-4.000000-10 X-TMASE-MatchedRID: ovzBAOTiWSu+G6+qk5NchmUcDj960n6veouvej40T4gHZBaLwEXlKGlF 7OhYLlctlpKpNiL4LlrnDKl/29aDwlbpry0uquBQx5sgyUhLCNtvgRsf4v9kCGu1t4C9sdNnZ5p KB3Mt9/zQGlxIVvV/XoAy6p60ZV62fJ5/bZ6npdiujVRFkkVsm3cRb8kmyaqBGHR/3echTjeQim U6defG31OuLGVKyn93BbPkrh9omLimc5/XlsjU7CO0rnsuRtVi7hDCxldXR/OshwFhMSNrafDsn HBTQS9kyoRE4tv/7I7j/Qm+fSvAAma0vgPD7M1vmFd/HOChTo8= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--0.426700-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24658.005 X-MDID: 1559722614-hwRK1ei8E2li Subject: [dpdk-dev] [PATCH 10/11] net/qede: 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: 29540be7efce ("net/qede: support LRO/TSO offloads") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko --- drivers/net/qede/qede_rxtx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c index bae26ce..c38cbb9 100644 --- a/drivers/net/qede/qede_rxtx.c +++ b/drivers/net/qede/qede_rxtx.c @@ -1798,17 +1798,17 @@ static inline uint32_t qede_rx_cqe_to_tunn_pkt_type(uint16_t flags) ol_flags = m->ol_flags; if (ol_flags & PKT_TX_TCP_SEG) { if (m->nb_segs >= ETH_TX_MAX_BDS_PER_LSO_PACKET) { - rte_errno = -EINVAL; + rte_errno = EINVAL; break; } /* TBD: confirm its ~9700B for both ? */ if (m->tso_segsz > ETH_TX_MAX_NON_LSO_PKT_LEN) { - rte_errno = -EINVAL; + rte_errno = EINVAL; break; } } else { if (m->nb_segs >= ETH_TX_MAX_BDS_PER_NON_LSO_PACKET) { - rte_errno = -EINVAL; + rte_errno = EINVAL; break; } } @@ -1825,14 +1825,14 @@ static inline uint32_t qede_rx_cqe_to_tunn_pkt_type(uint16_t flags) continue; } - rte_errno = -ENOTSUP; + rte_errno = ENOTSUP; break; } #ifdef RTE_LIBRTE_ETHDEV_DEBUG ret = rte_validate_tx_offload(m); if (ret != 0) { - rte_errno = ret; + rte_errno = -ret; break; } #endif -- 1.8.3.1