net/mlx5: fix TSO flag check

Message ID 20190820164323.17074-1-yskoh@mellanox.com
State Accepted
Delegated to: Raslan Darawsheh
Headers show
Series
  • net/mlx5: fix TSO flag check
Related show

Checks

Context Check Description
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing fail Performance Testing issues
ci/iol-Compile-Testing success Compile Testing PASS
ci/Intel-compilation fail Compilation issues
ci/checkpatch success coding style OK

Commit Message

Yongseok Koh Aug. 20, 2019, 4:43 p.m.
Fix some mistakes in Tx bursts in regard to TSO flag check.

Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")
Cc: viacheslavo@mellanox.com
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Raslan Darawsheh Aug. 22, 2019, 10:37 a.m. | #1
Hi,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Yongseok Koh
> Sent: Tuesday, August 20, 2019 7:43 PM
> To: Slava Ovsiienko <viacheslavo@mellanox.com>; Shahaf Shuler
> <shahafs@mellanox.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix TSO flag check
> 
> Fix some mistakes in Tx bursts in regard to TSO flag check.
> 
> Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")
> Cc: viacheslavo@mellanox.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> ---

Patch applied to next-net-mlx,

Kindest regards
Raslan Darawsheh

Patch

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 4c01187faa..8ec90c3d2d 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -3446,7 +3446,7 @@  mlx5_tx_burst_mseg(struct mlx5_txq_data *restrict txq,
 			continue;
 		/* Here ends the series of multi-segment packets. */
 		if (MLX5_TXOFF_CONFIG(TSO) &&
-		    unlikely(!(loc->mbuf->ol_flags & PKT_TX_TCP_SEG)))
+		    unlikely(loc->mbuf->ol_flags & PKT_TX_TCP_SEG))
 			return MLX5_TXCMP_CODE_TSO;
 		return MLX5_TXCMP_CODE_SINGLE;
 	}
@@ -3584,7 +3584,7 @@  mlx5_tx_burst_tso(struct mlx5_txq_data *restrict txq,
 		if (MLX5_TXOFF_CONFIG(MULTI) &&
 		    unlikely(NB_SEGS(loc->mbuf) > 1))
 			return MLX5_TXCMP_CODE_MULTI;
-		if (unlikely(!(loc->mbuf->ol_flags & PKT_TX_TCP_SEG)))
+		if (likely(!(loc->mbuf->ol_flags & PKT_TX_TCP_SEG)))
 			return MLX5_TXCMP_CODE_SINGLE;
 		/* Continue with the next TSO packet. */
 	}