[dpdk-dev] [PATCH 11/11] net/vmxnet3: fix Tx prepare to set positive rte_errno

Yong Wang yongwang at vmware.com
Thu Jun 6 00:45:30 CEST 2019


-----Original Message-----
From: Andrew Rybchenko <arybchenko at solarflare.com>
Date: Wednesday, June 5, 2019 at 1:17 AM
To: Yong Wang <yongwang at vmware.com>
Cc: "dev at dpdk.org" <dev at dpdk.org>, "stable at dpdk.org" <stable at dpdk.org>
Subject: [PATCH 11/11] net/vmxnet3: fix Tx prepare to set positive rte_errno

    Fixes: baf3bbae5556 ("net/vmxnet3: add Tx preparation")
    Cc: stable at dpdk.org
    
    Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
    ---

Acked-by: Yong Wang <yongwang at vmware.com>

     drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 ++++----
     1 file changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
    index 6644cde..7794d74 100644
    --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
    +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
    @@ -361,7 +361,7 @@
     		 */
     		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 @@
     		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;
     		}
     	}
    -- 
    1.8.3.1
    
    



More information about the dev mailing list