From: Felix Fietkau <nbd@nbd.name>
To: Paolo Abeni <pabeni@redhat.com>, Eric Dumazet <edumazet@google.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
David Ahern <dsahern@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] net: add TCP fraglist GRO support
Date: Tue, 23 Apr 2024 18:55:32 +0200 [thread overview]
Message-ID: <328ab7b3-4890-4e0d-8b9a-fed7700f1a6a@nbd.name> (raw)
In-Reply-To: <97f10c8b5b615eac8f65d67ef10928d97b6b760d.camel@redhat.com>
On 23.04.24 16:34, Paolo Abeni wrote:
> On Tue, 2024-04-23 at 14:23 +0200, Felix Fietkau wrote:
>> On 23.04.24 14:11, Eric Dumazet wrote:
>> > On Tue, Apr 23, 2024 at 1:55 PM Felix Fietkau <nbd@nbd.name> wrote:
>> > >
>> > > In the world of consumer-grade WiFi devices, there are a lot of chipsets
>> > > with limited or nonexistent SG support, and very limited checksum
>> > > offload capabilities on Ethernet. The WiFi side of these devices is
>> > > often even worse. I think fraglist GRO is a decent fallback for the
>> > > inevitable corner cases.
>> >
>> > What about netfilter and NAT ? Are they okay with NETIF_F_FRAGLIST_GRO already ?
>> >
>> > Many of these devices are probably using NAT.
>>
>> In my tests, nftables NAT works just fine, both with and without
>> flowtable offloading. I didn't see anything in netfilter that would have
>> a problem with this.
>
> I see you handle explicitly NAT changes in __tcpv4_gso_segment_csum(),
> like the current UDP code.
>
> The TCP header has many other fields that could be updated affecting
> the TCP csum.
> Handling every possible mutation looks cumbersome and will likely
> reduce the performance benefits.
>
> What is your plan WRT other TCP header fields update?
I think that should be easy enough to handle. My patch already only
combines packets where tcp_flag_word(th) is identical. So when
segmenting, I could handle all flags changes with a single
inet_proto_csum_replace4 call.
> Strictly WRT the patch, I guess it deserves to be split in series,
> moving UDP helpers in common code and possibly factoring out more
> helpers with separate patches.
Will do.
> e.g. in __tcpv4_gso_segment_csum() is quite similar
> __udpv4_gso_segment_csum() - even too much, as the tcp csum should be
> always be updated when the ports or addresses change ;)
Will fix that.
Thanks,
- Felix
next prev parent reply other threads:[~2024-04-23 16:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 9:41 [RFC] net: add TCP fraglist GRO support Felix Fietkau
2024-04-23 10:15 ` Eric Dumazet
2024-04-23 10:25 ` Felix Fietkau
2024-04-23 11:17 ` Eric Dumazet
2024-04-23 11:55 ` Felix Fietkau
2024-04-23 12:11 ` Eric Dumazet
2024-04-23 12:23 ` Felix Fietkau
2024-04-23 13:07 ` Eric Dumazet
2024-04-23 14:34 ` Paolo Abeni
2024-04-23 16:55 ` Felix Fietkau [this message]
2024-04-24 1:24 ` Willem de Bruijn
2024-04-24 13:50 ` Felix Fietkau
2024-04-24 14:30 ` Willem de Bruijn
2024-04-24 16:26 ` Felix Fietkau
2024-04-23 15:03 ` David Ahern
2024-04-23 15:18 ` Eric Dumazet
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=328ab7b3-4890-4e0d-8b9a-fed7700f1a6a@nbd.name \
--to=nbd@nbd.name \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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