net/mlx5: fix HW checksum offload for outer IP
authorYongseok Koh <yskoh@mellanox.com>
Wed, 3 Jan 2018 08:06:22 +0000 (00:06 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jan 2018 17:47:49 +0000 (18:47 +0100)
Checking HW checksum offload flag for outer IP is missing. If flag is set
for only outer IP, this can't be set properly.

Fixes: f5fde5205101 ("net/mlx5: add hardware checksum offload for tunnel packets")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
drivers/net/mlx5/mlx5_rxtx.h

index e70d523..90f1291 100644 (file)
@@ -636,7 +636,8 @@ txq_ol_cksum_to_cs(struct mlx5_txq_data *txq_data, struct rte_mbuf *buf)
 
        /* Should we enable HW CKSUM offload */
        if (buf->ol_flags &
-           (PKT_TX_IP_CKSUM | PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM)) {
+           (PKT_TX_IP_CKSUM | PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM |
+            PKT_TX_OUTER_IP_CKSUM)) {
                if (txq_data->tunnel_en &&
                    (buf->ol_flags &
                     (PKT_TX_TUNNEL_GRE | PKT_TX_TUNNEL_VXLAN))) {