[dpdk-stable] [PATCH 08/11] net/ice: fix Tx prepare to set positive rte_errno

Andrew Rybchenko arybchenko at solarflare.com
Wed Jun 5 10:16:01 CEST 2019


Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")
Cc: stable at dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
---
 drivers/net/ice/ice_rxtx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index c0d1a4b..84aeec2 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2370,20 +2370,20 @@ void __attribute__((cold))
 			/**
 			 * 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;
 		}
 	}
-- 
1.8.3.1



More information about the stable mailing list