[dpdk-dev] net/mlx5: fix TSO enablement

Message ID 20180315110005.14928-1-shahafs@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Shahaf Shuler
Headers

Checks

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

Commit Message

Shahaf Shuler March 15, 2018, 11 a.m. UTC
  TSO should be set if either of the TSO offload flags is requested.

Fixes: dbccb4cddcd2 ("net/mlx5: convert to new Tx offloads API")
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_txq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Comments

Shahaf Shuler March 21, 2018, 3:14 p.m. UTC | #1
Thursday, March 15, 2018 1:00 PM, Shahaf Shuler:
> TSO should be set if either of the TSO offload flags is requested.
> 
> Fixes: dbccb4cddcd2 ("net/mlx5: convert to new Tx offloads API")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
> Acked-by: Yongseok Koh <yskoh@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_txq.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

Applied to next-net-mlx, thanks.
  

Patch

diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index ed1c713ea..42996e8db 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -651,7 +651,9 @@  txq_set_params(struct mlx5_txq_ctrl *txq_ctrl)
 	unsigned int inline_max_packet_sz;
 	eth_tx_burst_t tx_pkt_burst = priv_select_tx_function(priv, priv->dev);
 	int is_empw_func = is_empw_burst_func(tx_pkt_burst);
-	int tso = !!(txq_ctrl->txq.offloads & DEV_TX_OFFLOAD_TCP_TSO);
+	int tso = !!(txq_ctrl->txq.offloads & (DEV_TX_OFFLOAD_TCP_TSO |
+					       DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
+					       DEV_TX_OFFLOAD_GRE_TNL_TSO));
 
 	txq_inline = (config->txq_inline == MLX5_ARG_UNSET) ?
 		0 : config->txq_inline;