From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 02E71A04E6 for ; Sat, 31 Oct 2020 04:35:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D065FCA35; Sat, 31 Oct 2020 04:35:28 +0100 (CET) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by dpdk.org (Postfix) with ESMTP id 32581CA10; Sat, 31 Oct 2020 04:35:24 +0100 (CET) Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CNPvY3VP1z15Pm2; Sat, 31 Oct 2020 11:35:21 +0800 (CST) Received: from tester.localdomain (10.175.119.39) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Sat, 31 Oct 2020 11:35:13 +0800 From: Xiaoyun wang To: CC: , , , , , , , Xiaoyun wang Date: Sat, 31 Oct 2020 11:38:36 +0800 Message-ID: <392e61ae8df83e841cbdfe779811152199304009.1604115055.git.cloud.wangxiaoyun@huawei.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.119.39] X-CFilter-Loop: Reflected Subject: [dpdk-stable] [PATCH v1 2/2] net/hinic: fix SCTP checksum error X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 125627e..9d0264e 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 + -- 1.8.3.1