From: Marat Khalili <marat.khalili@huawei.com>
To: 苏赛 <susai.ss@bytedance.com>,
"jasvinder.singh@intel.com" <jasvinder.singh@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH] net/cksum: compute raw cksum for several segments
Date: Thu, 31 Jul 2025 11:03:52 +0000 [thread overview]
Message-ID: <18bc89bd254340f0b15653be473b0979@huawei.com> (raw)
In-Reply-To: <2b98417ad1da4df2ac4e577b9c3938ae@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 773 bytes --]
Sorry, sent the previous email too quickly.
> -----Original Message-----
> From: Marat Khalili
> Sent: Thursday 31 July 2025 11:52
> To: '苏赛' <susai.ss@bytedance.com>; jasvinder.singh@intel.com
> Cc: dev@dpdk.org
> Subject: RE: [PATCH] net/cksum: compute raw cksum for several segments
> > +static inline uint16_t
> > +__rte_raw_cksum_reduce_u64(uint64_t sum)
> > +{
> > + uint32_t tmp;
> > +
> > + tmp = __rte_raw_cksum_reduce((uint32_t)sum);
> > + tmp += __rte_raw_cksum_reduce((uint32_t)(sum >> 32));
>
> What if this addition overflows?
Realized it cannot actually overflow, my bad (maybe still needs a comment). Now this function looks good to me as well.
> > + return __rte_raw_cksum_reduce(tmp);
> > +}
[-- Attachment #2: Type: text/html, Size: 3824 bytes --]
next prev parent reply other threads:[~2025-07-31 11:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-31 9:55 苏赛
2025-07-31 10:51 ` Marat Khalili
2025-07-31 11:03 ` Marat Khalili [this message]
2025-07-31 11:31 ` [External] " Su Sai
2025-07-31 11:43 ` Marat Khalili
2025-07-31 11:46 ` Marat Khalili
2025-07-31 12:22 ` zhoumin
2025-08-01 7:26 ` Su Sai
2025-08-01 15:28 ` [v2] " Su Sai
2025-08-01 16:39 ` Marat Khalili
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=18bc89bd254340f0b15653be473b0979@huawei.com \
--to=marat.khalili@huawei.com \
--cc=dev@dpdk.org \
--cc=jasvinder.singh@intel.com \
--cc=susai.ss@bytedance.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).