net/vmxnet3: fix Tx prepare to set positive rte_errno

Fixes: baf3bbae55 ("net/vmxnet3: add Tx preparation")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Yong Wang <yongwang@vmware.com>
This commit is contained in:
Andrew Rybchenko 2019-06-05 09:16:04 +01:00 committed by Ferruh Yigit
parent 48aa952c9b
commit fcae1808f8

View File

@ -361,7 +361,7 @@ vmxnet3_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
*/
if ((ol_flags & PKT_TX_TCP_SEG) == 0 &&
m->nb_segs > VMXNET3_MAX_TXD_PER_PKT) {
rte_errno = -EINVAL;
rte_errno = EINVAL;
return i;
}
@ -369,20 +369,20 @@ vmxnet3_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
if ((ol_flags & VMXNET3_TX_OFFLOAD_NOTSUP_MASK) != 0 ||
(ol_flags & PKT_TX_L4_MASK) ==
PKT_TX_SCTP_CKSUM) {
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;
}
}