summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongseok Koh <yskoh@mellanox.com>2019-08-20 09:43:23 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2019-08-26 14:41:13 +0200
commit30d87a5ed5acb765ea9b2fd9887a926c0811c150 (patch)
tree321b2aeeea10c809ce74d0b2afc1453e174bd400
parentc6cc228e9ddf3df925ac9482925059666bc9acb1 (diff)
downloaddpdk-next-eventdev-30d87a5ed5acb765ea9b2fd9887a926c0811c150.zip
dpdk-next-eventdev-30d87a5ed5acb765ea9b2fd9887a926c0811c150.tar.gz
dpdk-next-eventdev-30d87a5ed5acb765ea9b2fd9887a926c0811c150.tar.xz
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: stable@dpdk.org Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
-rw-r--r--drivers/net/mlx5/mlx5_rxtx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 4c01187..8ec90c3 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. */
}