From: Antoine Tenart <atenart@kernel.org>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Cc: steffen.klassert@secunet.com, willemdebruijn.kernel@gmail.com,
netdev@vger.kernel.org
Subject: Re: [PATCH net v3 3/4] udp: do not transition UDP GRO fraglist partial checksums to unnecessary
Date: Tue, 26 Mar 2024 10:44:55 +0100 [thread overview]
Message-ID: <171144629575.5526.17151762059541054429@kwain> (raw)
In-Reply-To: <6601c4f27529_11bc25294b@willemb.c.googlers.com.notmuch>
Quoting Willem de Bruijn (2024-03-25 19:39:46)
> Antoine Tenart wrote:
> > Quoting Willem de Bruijn (2024-03-22 18:29:40)
> > >
> > > Should fraglist UDP GRO and non-fraglist (udp_gro_complete_segment)
> > > have the same checksumming behavior?
> >
> > They can't as non-fraglist GRO packets can be aggregated, csum can't
> > just be converted there.
>
> I suppose this could be done. But it is just simpler to convert to
> CHECKSUM_UNNECESSARY.
Oh, do you mean using the non-fraglist behavior in fraglist?
udp_gro_complete_segment converts all packets to CHECKSUM_PARTIAL (as
packets could have been aggregated) but that's not required in fraglist.
To say it another way: my understanding is packets in the non-fraglist
case have to be converted to CHECKSUM_PARTIAL, while the fraglist case
can keep the checksum info as-is (and have the conversion to unnecessary
as an optimization when applicable).
> You mean that on segmentation, the segments are restored and thus
> skb->csum of each segment is again correct, right?
In the fraglist case, yes.
> I suppose this could be converted to CHECKSUM_UNNECESSARY if just
> for equivalence between the two UDP_GRO methods and simplicity.
>
> But also fine to leave as is.
I'm not sure I got your suggestion as I don't see how non-fraglist
packets could be converted to CHECKSUM_UNNECESSARY when being aggregated
(uh->len can change there).
This series is aiming at fixing known issues and unifying the behavior
would be net-next material IMO. I'll send a v4 for those fixes, but then
I'm happy to discuss the above suggestion and investigate; so let's
continue the discussion here in parallel.
> Can you at least summarize this in the commit message? Currently
> CHECKSUM_COMPLETE is not mentioned, but the behavior is not trivial.
> It may be helpful next time we again stumble on this code and do a
> git blame.
Sure, I'll try to improve the commit log.
Thanks!
Antoine
next prev parent reply other threads:[~2024-03-26 9:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-22 11:46 [PATCH net v3 0/4] gro: various fixes related to UDP tunnels Antoine Tenart
2024-03-22 11:46 ` [PATCH net v3 1/4] udp: do not accept non-tunnel GSO skbs landing in a tunnel Antoine Tenart
2024-03-22 11:46 ` [PATCH net v3 2/4] gro: fix ownership transfer Antoine Tenart
2024-03-22 11:46 ` [PATCH net v3 3/4] udp: do not transition UDP GRO fraglist partial checksums to unnecessary Antoine Tenart
2024-03-22 17:29 ` Willem de Bruijn
2024-03-25 10:37 ` Antoine Tenart
2024-03-25 18:39 ` Willem de Bruijn
2024-03-26 9:44 ` Antoine Tenart [this message]
2024-03-26 13:37 ` Willem de Bruijn
2024-03-22 11:46 ` [PATCH net v3 4/4] udp: prevent local UDP tunnel packets from being GROed Antoine Tenart
2024-03-22 22:55 ` [PATCH net v3 0/4] gro: various fixes related to UDP tunnels Jakub Kicinski
2024-03-25 10:16 ` Antoine Tenart
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=171144629575.5526.17151762059541054429@kwain \
--to=atenart@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=steffen.klassert@secunet.com \
--cc=willemdebruijn.kernel@gmail.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