diff mbox series

[05/11] net/fm10k: fix Tx prepare to set positive rte_errno

Message ID 1559722565-25992-6-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series ethdev: fix Tx prepare to set positive rte_errno | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Andrew Rybchenko June 5, 2019, 8:15 a.m. UTC
Fixes: 9b134aa39716 ("net/fm10k: add Tx preparation")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/fm10k/fm10k_rxtx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Wang, Xiao W June 10, 2019, 2:05 a.m. UTC | #1
Hi,

> -----Original Message-----
> From: Andrew Rybchenko [mailto:arybchenko@solarflare.com]
> Sent: Wednesday, June 5, 2019 4:16 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Wang, Xiao W
> <xiao.w.wang@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH 05/11] net/fm10k: fix Tx prepare to set positive rte_errno
> 
> Fixes: 9b134aa39716 ("net/fm10k: add Tx preparation")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> ---
>  drivers/net/fm10k/fm10k_rxtx.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c
> index cc95f95..2f4dad0 100644
> --- a/drivers/net/fm10k/fm10k_rxtx.c
> +++ b/drivers/net/fm10k/fm10k_rxtx.c
> @@ -698,25 +698,25 @@ static inline void tx_xmit_pkt(struct
> fm10k_tx_queue *q, struct rte_mbuf *mb)
> 
>  		if ((m->ol_flags & PKT_TX_TCP_SEG) &&
>  				(m->tso_segsz < FM10K_TSO_MINMSS)) {
> -			rte_errno = -EINVAL;
> +			rte_errno = EINVAL;
>  			return i;
>  		}
> 
>  		if (m->ol_flags & FM10K_TX_OFFLOAD_NOTSUP_MASK) {
> -			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

Acked-by: Xiao Wang <xiao.w.wang@intel.com>
diff mbox series

Patch

diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c
index cc95f95..2f4dad0 100644
--- a/drivers/net/fm10k/fm10k_rxtx.c
+++ b/drivers/net/fm10k/fm10k_rxtx.c
@@ -698,25 +698,25 @@  static inline void tx_xmit_pkt(struct fm10k_tx_queue *q, struct rte_mbuf *mb)
 
 		if ((m->ol_flags & PKT_TX_TCP_SEG) &&
 				(m->tso_segsz < FM10K_TSO_MINMSS)) {
-			rte_errno = -EINVAL;
+			rte_errno = EINVAL;
 			return i;
 		}
 
 		if (m->ol_flags & FM10K_TX_OFFLOAD_NOTSUP_MASK) {
-			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;
 		}
 	}