From: Yongseok Koh Date: Wed, 23 May 2018 11:27:09 +0000 (-0700) Subject: net/mlx5: fix SW parser offset X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=52056a99c655c443430f0ad79e491a3e24654c95;p=dpdk.git net/mlx5: fix SW parser offset 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 --- diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h index d65cd1be84..f53bb43c3b 100644 --- a/drivers/net/mlx5/mlx5_rxtx.h +++ b/drivers/net/mlx5/mlx5_rxtx.h @@ -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. */