Base on hns3 network engine, when the rte_eth_tx_burst API is called
by Upper Level Process, if PKT_TX_TCP_SEG flag is set and tso_segsz
is 0 in the input parameter structure rte_mbuf, hns3 PMD driver will
process this packet as an non-TSO packet, otherwise hardware will enter
an abnormal state.
Fixes:
6dca716c9e1d ("net/hns3: support TSO")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
return 0;
}
+static inline bool
+hns3_pkt_is_tso(struct rte_mbuf *m)
+{
+ return (m->tso_segsz != 0 && m->ol_flags & PKT_TX_TCP_SEG);
+}
+
static void
hns3_set_tso(struct hns3_desc *desc,
uint64_t ol_flags, struct rte_mbuf *rxm)
uint32_t tmp;
uint8_t l2_len = rxm->l2_len;
- if (!(ol_flags & PKT_TX_TCP_SEG))
+ if (!hns3_pkt_is_tso(rxm))
return;
if (hns3_tso_proc_tunnel(desc, ol_flags, rxm, &l2_len))
}
}
-static inline bool
-hns3_pkt_is_tso(struct rte_mbuf *m)
-{
- return (m->tso_segsz != 0 && m->ol_flags & PKT_TX_TCP_SEG);
-}
-
static int
hns3_check_tso_pkt_valid(struct rte_mbuf *m)
{