From: Mat Martineau <mathew.j.martineau@linux.intel.com>
To: Geliang Tang <geliangtang@gmail.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [MPTCP][PATCH mptcp-next] Squash to "mptcp: generate the data checksum"
Date: Thu, 20 May 2021 14:56:35 -0700 (PDT) [thread overview]
Message-ID: <17b67263-42e6-3420-7a8e-de37d87e6fc3@linux.intel.com> (raw)
In-Reply-To: <ae2099811b8395f7718855c5c7d412b26d960c95.1621321549.git.geliangtang@gmail.com>
On Tue, 18 May 2021, Geliang Tang wrote:
> Move this line "__wsum csum = ~csum_unfold(mpext->csum);" from "mptcp:
> validate the data checksum" to "mptcp: generate the data checksum".
>
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
> ---
> net/mptcp/protocol.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index 38ce8d50e665..58253bd09f93 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -1311,7 +1311,7 @@ static bool mptcp_alloc_tx_skb(struct sock *sk, struct sock *ssk)
> static void mptcp_update_data_checksum(struct sk_buff *skb, int added)
> {
> struct mptcp_ext *mpext = mptcp_get_ext(skb);
> - __wsum csum = csum_unfold(mpext->csum);
> + __wsum csum = ~csum_unfold(mpext->csum);
> int offset = skb->len - added;
>
> mpext->csum = csum_fold(csum_block_add(csum, skb_checksum(skb, offset, added, 0), offset));
> --
> 2.31.1
Looks good, thanks Geliang.
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
--
Mat Martineau
Intel
next prev parent reply other threads:[~2021-05-20 21:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 7:06 [MPTCP][PATCH mptcp-next] Squash to "mptcp: generate the data checksum" Geliang Tang
2021-05-20 21:56 ` Mat Martineau [this message]
2021-06-03 14:59 ` Matthieu Baerts
-- strict thread matches above, loose matches on Subject: below --
2021-05-07 4:18 Geliang Tang
2021-05-11 0:45 ` Mat Martineau
2021-05-11 4:03 ` Geliang Tang
2021-05-11 23:17 ` Mat Martineau
2021-05-12 4:18 ` Geliang Tang
2021-05-13 7:42 ` Matthieu Baerts
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=17b67263-42e6-3420-7a8e-de37d87e6fc3@linux.intel.com \
--to=mathew.j.martineau@linux.intel.com \
--cc=geliangtang@gmail.com \
--cc=mptcp@lists.linux.dev \
/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).