net/mlx5: fix TSO TCP checksum flag
authorShahaf Shuler <shahafs@mellanox.com>
Tue, 7 Mar 2017 11:47:51 +0000 (13:47 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 4 Apr 2017 13:52:52 +0000 (15:52 +0200)
Since PKT_TX_TCP_SEG implies PKT_TX_TCP_CKSUM, the PMD must force this
flag.
The fix applied for both tunneled and non-tunneled packets.

Fixes: 3f13f8c23a7c ("net/mlx5: support hardware TSO")
Fixes: b247f346019b ("net/mlx5: support hardware TSO for VXLAN and GRE")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
drivers/net/mlx5/mlx5_rxtx.c

index 6aee69c..c17504d 100644 (file)
@@ -577,6 +577,9 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
                                if (is_tunneled && txq->tunnel_en) {
                                        tso_header_sz += buf->outer_l2_len +
                                                         buf->outer_l3_len;
+                                       cs_flags |= MLX5_ETH_WQE_L4_INNER_CSUM;
+                               } else {
+                                       cs_flags |= MLX5_ETH_WQE_L4_CSUM;
                                }
                                if (unlikely(tso_header_sz >
                                             MLX5_MAX_TSO_HEADER))