net/hinic: fix offload info calculating for TSO
authorXiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Fri, 1 Nov 2019 13:36:43 +0000 (21:36 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Nov 2019 22:15:05 +0000 (23:15 +0100)
For VXLAN TSO offload, PMD calculates offload info
err due to the wrong branch, which can cause hardware failed.

Fixes: c3ba1f0f20cd ("net/hinic: support inner L3 checksum offload")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
drivers/net/hinic/hinic_pmd_tx.c

index bdbb0f4..985540a 100644 (file)
@@ -811,7 +811,8 @@ hinic_tx_offload_pkt_prepare(struct rte_mbuf *m,
 
        if (ol_flags & PKT_TX_TUNNEL_VXLAN) {
                if ((ol_flags & PKT_TX_OUTER_IP_CKSUM) ||
-                   (ol_flags & PKT_TX_OUTER_IPV6)) {
+                   (ol_flags & PKT_TX_OUTER_IPV6) ||
+                   (ol_flags & PKT_TX_TCP_SEG)) {
                        inner_l3_offset = m->l2_len + m->outer_l2_len +
                                m->outer_l3_len;
                        off_info->outer_l2_len = m->outer_l2_len;