From: Andrew Rybchenko Date: Wed, 5 Jun 2019 08:16:01 +0000 (+0100) Subject: net/ice: fix Tx prepare to set positive rte_errno X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9f9969e1478022bbb1295940a584f5c8ecb4f686;p=dpdk.git net/ice: fix Tx prepare to set positive rte_errno Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko Reviewed-by: Ferruh Yigit --- diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index c0d1a4bea3..84aeec2386 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -2370,20 +2370,20 @@ ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, /** * MSS outside the range are considered malicious */ - rte_errno = -EINVAL; + rte_errno = EINVAL; 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; } }