summaryrefslogtreecommitdiff
path: root/drivers/net/ena
diff options
context:
space:
mode:
authorMichal Krawczyk <mk@semihalf.com>2019-01-25 09:10:26 +0100
committerThomas Monjalon <thomas@monjalon.net>2019-01-27 23:38:37 +0100
commitbaeed5f404dd1b049118cfec26a2fd3203671572 (patch)
treef8b03388750c70ecddf971805474eb1147b94ae3 /drivers/net/ena
parentfd9768905870856a2340266d25f8c0100dfccfff (diff)
downloaddpdk-next-eventdev-baeed5f404dd1b049118cfec26a2fd3203671572.zip
dpdk-next-eventdev-baeed5f404dd1b049118cfec26a2fd3203671572.tar.gz
dpdk-next-eventdev-baeed5f404dd1b049118cfec26a2fd3203671572.tar.xz
net/ena: fix errno to positive value
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>
Diffstat (limited to 'drivers/net/ena')
-rw-r--r--drivers/net/ena/ena_ethdev.c6
1 files 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;
}
}