[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9eefc224988841c9b1a0b6c6eb3348b8@AcuMS.aculab.com>
Date: Thu, 2 Dec 2021 20:58:46 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Vladimir Oltean' <olteanv@...il.com>,
Eric Dumazet <edumazet@...gle.com>
CC: Eric Dumazet <eric.dumazet@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
netdev <netdev@...r.kernel.org>
Subject: RE: [PATCH net-next 2/2] net: optimize skb_postpull_rcsum()
> To me it looks like the strange part is that the checksum of the removed
> block (printed by me as "csum_partial(start, len, 0)" inside
> skb_postpull_rcsum()) is the same as the skb->csum itself.
If you are removing all the bytes that made the original checksum
that will happen.
And that might be true for the packets you are building.
Try replacing both ~ with -.
So replace:
skb->csum = ~csum_partial(start, len, ~skb->csum);
with:
skb->csum = -csum_partial(start, len, -skb->csum);
That should geneate ~0u instead 0 (if I've got my maths right).
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists