]> git.droids-corp.org - dpdk.git/commitdiff
net/enic: fix Tx prepare to set positive rte_errno
authorAndrew Rybchenko <arybchenko@solarflare.com>
Wed, 5 Jun 2019 08:15:57 +0000 (09:15 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 13 Jun 2019 14:54:30 +0000 (23:54 +0900)
Fixes: 1e81dbb5321b ("net/enic: add Tx prepare handler")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/enic/enic_rxtx.c

index 0aadd3426841aa3d1ea7b79d8614e2f5e2ac4eb9..8fa864737352a79d6373befa310a276c5c7c5eda 100644 (file)
@@ -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;
                }
        }