From: Michal Krawczyk <mk@semihalf.com>
To: gtzalik@amazon.com, mw@semihalf.com, matua@amazon.com
Cc: rk@semihalf.com, dev@dpdk.org, Michal Krawczyk <mk@semihalf.com>,
stable@dpdk.org
Subject: [dpdk-stable] [PATCH 3/5] net/ena: fix setting rte_errno to negative value
Date: Fri, 25 Jan 2019 09:10:26 +0100 [thread overview]
Message-ID: <1548403828-31870-4-git-send-email-mk@semihalf.com> (raw)
In-Reply-To: <1548403828-31870-1-git-send-email-mk@semihalf.com>
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 <mk@semihalf.com>
---
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
prev parent reply other threads:[~2019-01-25 8:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1548403828-31870-1-git-send-email-mk@semihalf.com>
2019-01-25 8:10 ` [dpdk-stable] [PATCH 2/5] net/ena: fix dev init for RTE_PROC_SECONDARY Michal Krawczyk
2019-01-25 8:10 ` Michal Krawczyk [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1548403828-31870-4-git-send-email-mk@semihalf.com \
--to=mk@semihalf.com \
--cc=dev@dpdk.org \
--cc=gtzalik@amazon.com \
--cc=matua@amazon.com \
--cc=mw@semihalf.com \
--cc=rk@semihalf.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).