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 <yskoh@mellanox.com>
This commit is contained in:
Yongseok Koh 2018-05-23 04:27:09 -07:00 committed by Ferruh Yigit
parent eef1e585f9
commit 52056a99c6

View 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. */