From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) by dpdk.org (Postfix) with ESMTP id 2FCC537B7 for ; Fri, 25 Jan 2019 09:10:36 +0100 (CET) Received: by mail-lf1-f68.google.com with SMTP id l10so6263447lfh.9 for ; Fri, 25 Jan 2019 00:10:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BU5BFQG7xvAPnopFsAruFjmtdZXrMEc9pXRWh1ibPPc=; b=UOqPiEGgwovPtBkvrR/2Uz4gGlhHDgdk05ZwpmgsRustub+TetxyFGTTPEavy9GJRE hITB9Yi6Nn7xCBLYq/3NyN/sMf6tYHWJcbIhLBtabPH19nCfamLOPl68ezv27xy2NFOx oWAcfvOgcvfXvTmMAOyEmvIzQjAajVx79aztKLHwweYwpywJBcp94iV86CnOUNrYL7RB mltFmqy90S6s382CtbSg/UnKVLisMZasjUdJWQO7uSaG5jExpIwQ9mN5EPm+HRjCIbqp +apH0kNsooUuTbL15QxqjKrPPw0cLZopXGyk5rfqK1hzmLPoG1vwW6T6wvjpzkl5mrX8 0+Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BU5BFQG7xvAPnopFsAruFjmtdZXrMEc9pXRWh1ibPPc=; b=M47NmJoCUteL4v31qQUT62NnTtmcDM2QI2myAn80FN3UcOVXDC5mHuQiicg3KmkHBS N1UP9Aw/hyPcFerot28cL0OlFsNF+bPnQHRfeqZPoc0qjZsknIbjV4FBdMvOzY9UW528 qYwZ53o7/edWi5tKr1hhKHGM7mdAc+2CnRpZekSN3r2WSO/9KUmwLN8dTDc+fUEY57bM iEnjxOqPMoN3MLIQsxaFHut8z63qmE7Xj8GIkCwP67/X5gwEXO4axRkD90tAXJyvKYDV ISlk5dtsYvL1j9cTQMAbA4I/XZtwm1cVwCf3m0fcmovfj/vNJ3VZwdwu1veMmORIGbTm EeqA== X-Gm-Message-State: AJcUukeFq6jGWg84vO0jBGMUnICu739RI2Rkb5VnjywV7ZbjyplxknpD Jo3qkZ2K0NRxT8Q+8n95xTXcfg== X-Google-Smtp-Source: ALg8bN7jh9bpgtef7MTmfyvXqre7A/67Eh3f5VYpKrRDc8AU6znM/AxJLG6SGimKUlAu2d0DTpmC+g== X-Received: by 2002:a19:6e0b:: with SMTP id j11mr7793387lfc.124.1548403835687; Fri, 25 Jan 2019 00:10:35 -0800 (PST) Received: from localhost.localdomain ([185.157.12.197]) by smtp.gmail.com with ESMTPSA id m21sm1358664lfl.97.2019.01.25.00.10.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 Jan 2019 00:10:34 -0800 (PST) From: Michal Krawczyk To: gtzalik@amazon.com, mw@semihalf.com, matua@amazon.com Cc: rk@semihalf.com, dev@dpdk.org, Michal Krawczyk , stable@dpdk.org Date: Fri, 25 Jan 2019 09:10:26 +0100 Message-Id: <1548403828-31870-4-git-send-email-mk@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548403828-31870-1-git-send-email-mk@semihalf.com> References: <1548403828-31870-1-git-send-email-mk@semihalf.com> Subject: [dpdk-dev] [PATCH 3/5] net/ena: fix setting rte_errno to negative 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: Fri, 25 Jan 2019 08:10:36 -0000 The rte_errno shouldn't have assigned negative error codes, so it has to be fixed. Fixes: b3fc5a1ae10d ("net/ena: add Tx preparation") Cc: stable@dpdk.org Signed-off-by: Michal Krawczyk --- drivers/net/ena/ena_ethdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 747390b..8bb05ca 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -2178,14 +2178,14 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, if ((ol_flags & ENA_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 @@ -2198,7 +2198,7 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, ret = rte_net_intel_cksum_flags_prepare(m, ol_flags & ~PKT_TX_TCP_SEG); if (ret != 0) { - rte_errno = ret; + rte_errno = -ret; return i; } } -- 2.7.4