net/mlx5: fix SW parser offset
authorYongseok Koh <yskoh@mellanox.com>
Wed, 23 May 2018 11:27:09 +0000 (04:27 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 25 May 2018 15:07:40 +0000 (17:07 +0200)
This is to fix the offloads introduced by commits
5f8ba81 net/mlx5: support generic tunnel offloading
5355f44 ethdev: introduce generic IP/UDP tunnel checksum and TSO

Fixes: 8589e944d075 ("net/mlx5: fix setting offsets for SW parser")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
drivers/net/mlx5/mlx5_rxtx.h

index d65cd1b..f53bb43 100644 (file)
@@ -687,10 +687,9 @@ txq_mbuf_to_swp(struct mlx5_txq_data *txq, struct rte_mbuf *buf,
         */
        off = buf->outer_l2_len + (vlan ? sizeof(struct vlan_hdr) : 0);
        offsets[1] = off >> 1; /* Outer L3 offset. */
-       if (tunnel == PKT_TX_TUNNEL_UDP) {
-               off += buf->outer_l3_len;
+       off += buf->outer_l3_len;
+       if (tunnel == PKT_TX_TUNNEL_UDP)
                offsets[0] = off >> 1; /* Outer L4 offset. */
-       }
        if (inner_ip) {
                off += buf->l2_len;
                offsets[3] = off >> 1; /* Inner L3 offset. */