From: Xiaoyun wang <cloud.wangxiaoyun@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <bluca@debian.org>, <stable@dpdk.org>,
<luoxingyu@huawei.com>, <luoxianjun@huawei.com>,
<yin.yinshi@huawei.com>, <zhouguoyang@huawei.com>,
Xiaoyun wang <cloud.wangxiaoyun@huawei.com>
Subject: [dpdk-dev] [PATCH v1 2/2] net/hinic: fix SCTP checksum error
Date: Sat, 31 Oct 2020 11:38:36 +0800 [thread overview]
Message-ID: <392e61ae8df83e841cbdfe779811152199304009.1604115055.git.cloud.wangxiaoyun@huawei.com> (raw)
In-Reply-To: <cover.1604115055.git.cloud.wangxiaoyun@huawei.com>
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 <cloud.wangxiaoyun@huawei.com>
---
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
next prev parent reply other threads:[~2020-10-31 3:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-31 3:38 [dpdk-dev] [PATCH v1 0/2] fix some csum errors Xiaoyun wang
2020-10-31 3:38 ` [dpdk-dev] [PATCH v1 1/2] net/hinic: fix outer_l3_len parse error Xiaoyun wang
2020-11-02 17:08 ` Ferruh Yigit
2020-11-02 17:26 ` Ferruh Yigit
2020-11-04 2:19 ` Wangxiaoyun (Cloud)
2020-11-04 11:05 ` Ferruh Yigit
2020-10-31 3:38 ` Xiaoyun wang [this message]
2020-11-02 17:47 ` [dpdk-dev] [PATCH v1 0/2] fix some csum errors Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=392e61ae8df83e841cbdfe779811152199304009.1604115055.git.cloud.wangxiaoyun@huawei.com \
--to=cloud.wangxiaoyun@huawei.com \
--cc=bluca@debian.org \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=luoxianjun@huawei.com \
--cc=luoxingyu@huawei.com \
--cc=stable@dpdk.org \
--cc=yin.yinshi@huawei.com \
--cc=zhouguoyang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).