From: Andrew Rybchenko Date: Wed, 5 Jun 2019 08:15:57 +0000 (+0100) Subject: net/enic: fix Tx prepare to set positive rte_errno X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ad8473ef0a155ee385caf5f3109abccc73b7728f;p=dpdk.git net/enic: fix Tx prepare to set positive rte_errno Fixes: 1e81dbb5321b ("net/enic: add Tx prepare handler") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko Reviewed-by: Ferruh Yigit --- diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c index 0aadd34268..8fa8647373 100644 --- a/drivers/net/enic/enic_rxtx.c +++ b/drivers/net/enic/enic_rxtx.c @@ -416,13 +416,13 @@ uint16_t enic_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, #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; } }