From: Andrew Rybchenko Date: Wed, 5 Jun 2019 08:16:02 +0000 (+0100) Subject: net/ixgbe: fix Tx prepare to set positive rte_errno X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=53dd95c10b1b9f5748d191becd710fbe531e378a;p=dpdk.git net/ixgbe: fix Tx prepare to set positive rte_errno Fixes: 7829b8d52be0 ("net/ixgbe: add Tx preparation") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko Reviewed-by: Ferruh Yigit --- diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index a8ce561e23..edcfa60cec 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -984,25 +984,25 @@ ixgbe_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) */ if (m->nb_segs > IXGBE_TX_MAX_SEG - txq->wthresh) { - rte_errno = -EINVAL; + rte_errno = EINVAL; return i; } if (ol_flags & IXGBE_TX_OFFLOAD_NOTSUP_MASK) { - 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 ret = rte_net_intel_cksum_prepare(m); if (ret != 0) { - rte_errno = ret; + rte_errno = -ret; return i; } }