From: Xiaoyun Wang Date: Sat, 31 Oct 2020 03:38:36 +0000 (+0800) Subject: net/hinic: fix SCTP checksum error X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0e63dcc9562213915f1256f017d397238896cf77;p=dpdk.git 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 --- 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 +