From 0e63dcc9562213915f1256f017d397238896cf77 Mon Sep 17 00:00:00 2001 From: Xiaoyun Wang Date: Sat, 31 Oct 2020 11:38:36 +0800 Subject: [PATCH] net/hinic: fix SCTP checksum error For SCTP checksum offload, pmd driver does not parse payload offset info, which may cause hardware calculate SCTP checksum failed. Fixes: 8c8b61234ffd ("net/hinic: refactor checksum functions") Cc: stable@dpdk.org 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 125627e0ee..9d0264e67a 100644 --- a/drivers/net/hinic/hinic_pmd_tx.c +++ b/drivers/net/hinic/hinic_pmd_tx.c @@ -767,7 +767,8 @@ static inline void hinic_get_pld_offset(struct rte_mbuf *m, { uint64_t ol_flags = m->ol_flags; - if ((ol_flags & PKT_TX_L4_MASK) == PKT_TX_UDP_CKSUM) + if (((ol_flags & PKT_TX_L4_MASK) == PKT_TX_UDP_CKSUM) || + ((ol_flags & PKT_TX_L4_MASK) == PKT_TX_SCTP_CKSUM)) off_info->payload_offset = m->l2_len + m->l3_len; else if ((ol_flags & PKT_TX_TCP_CKSUM) || (ol_flags & PKT_TX_TCP_SEG)) off_info->payload_offset = m->l2_len + m->l3_len + -- 2.20.1