From: Eric Dumazet <eric.dumazet@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Mathieu Malaterre <malat@debian.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
LKML <linux-kernel@vger.kernel.org>,
Christophe LEROY <christophe.leroy@c-s.fr>,
Meelis Roos <mroos@linux.ee>,
netdev@vger.kernel.org,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] Revert "net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends"
Date: Sun, 17 Jun 2018 15:54:48 -0700 [thread overview]
Message-ID: <e1a9b126-3226-72d0-82b2-b69ca5f59ccb@gmail.com> (raw)
In-Reply-To: <m2tvq1672p.fsf@linux-m68k.org>
On 06/17/2018 03:27 AM, Andreas Schwab wrote:
>
> That doesn't change anything.
OK, thanks !
Oh this is silly, please try :
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index c642304f178ce0a4e1358d59e45032a39f76fb3f..54dd9c18ecad817812898d6f335e1794a07dabbe 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -1845,10 +1845,9 @@ EXPORT_SYMBOL(___pskb_trim);
int pskb_trim_rcsum_slow(struct sk_buff *skb, unsigned int len)
{
if (skb->ip_summed == CHECKSUM_COMPLETE) {
- int delta = skb->len - len;
+ __wsum csumdiff = skb_checksum(skb, len, skb->len - len, 0);
- skb->csum = csum_sub(skb->csum,
- skb_checksum(skb, len, delta, 0));
+ skb->csum = csum_block_sub(skb->csum, csumdiff, len);
}
return __pskb_trim(skb, len);
}
next prev parent reply other threads:[~2018-06-17 22:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180615185645.8921-1-malat@debian.org>
[not found] ` <fbb95c11-240c-1a11-0a62-0483908c577e@gmail.com>
2018-06-16 7:14 ` [PATCH] Revert "net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends" Mathieu Malaterre
2018-06-16 12:45 ` Eric Dumazet
2018-06-17 10:27 ` Andreas Schwab
2018-06-17 22:54 ` Eric Dumazet [this message]
2018-06-18 17:54 ` Andreas Schwab
2018-06-18 18:18 ` Eric Dumazet
2018-06-18 18:45 ` Mathieu Malaterre
2018-06-18 23:29 ` Eric Dumazet
2018-06-18 23:36 ` Eric Dumazet
2018-06-19 19:10 ` Andreas Schwab
2018-06-19 20:10 ` Eric Dumazet
2018-06-19 22:10 ` Eric Dumazet
2018-06-19 22:32 ` Andreas Schwab
2018-06-19 22:40 ` Eric Dumazet
2018-06-18 18:29 ` Mathieu Malaterre
2018-06-17 10:09 ` Andreas Schwab
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=e1a9b126-3226-72d0-82b2-b69ca5f59ccb@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=christophe.leroy@c-s.fr \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=malat@debian.org \
--cc=mroos@linux.ee \
--cc=netdev@vger.kernel.org \
--cc=schwab@linux-m68k.org \
/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).