From 203911b1dc33db7b16e598c7ce36229652bc0d1a Mon Sep 17 00:00:00 2001 From: Xiaoyun Wang Date: Fri, 1 Nov 2019 21:36:43 +0800 Subject: [PATCH] net/hinic: fix offload info calculating for TSO 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 --- drivers/net/hinic/hinic_pmd_tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c index bdbb0f4a4c..985540a935 100644 --- a/drivers/net/hinic/hinic_pmd_tx.c +++ b/drivers/net/hinic/hinic_pmd_tx.c @@ -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; -- 2.20.1