From: Jakub Sitnicki <jakub@cloudflare.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
kernel-team@cloudflare.com
Subject: Re: [PATCH net v3 1/3] net: Make USO depend on CSUM offload
Date: Thu, 08 Aug 2024 10:28:00 +0200 [thread overview]
Message-ID: <87plqjxvu7.fsf@cloudflare.com> (raw)
In-Reply-To: <66b42d7ee8ab0_3795002940@willemb.c.googlers.com.notmuch> (Willem de Bruijn's message of "Wed, 07 Aug 2024 22:29:18 -0400")
On Wed, Aug 07, 2024 at 10:29 PM -04, Willem de Bruijn wrote:
> Jakub Sitnicki wrote:
>> UDP segmentation offload inherently depends on checksum offload. It should
>> not be possible to disable checksum offload while leaving USO enabled.
>> Enforce this dependency in code.
>>
>> There is a single tx-udp-segmentation feature flag to indicate support for
>> both IPv4/6, hence the devices wishing to support USO must offer checksum
>> offload for both IP versions.
>>
>> Fixes: 83aa025f535f ("udp: add gso support to virtual devices")
>
> Was this not introduced by removing the CHECKSUM_PARTIAL check in
> udp_send_skb?
Makes sense. It only became a problem after that change. Will update.
>
>> Suggested-by: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
>> Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
>> ---
>> net/core/dev.c | 27 ++++++++++++++++++---------
>> 1 file changed, 18 insertions(+), 9 deletions(-)
>>
>> diff --git a/net/core/dev.c b/net/core/dev.c
>> index 751d9b70e6ad..dfb12164b35d 100644
>> --- a/net/core/dev.c
>> +++ b/net/core/dev.c
>> @@ -9912,6 +9912,16 @@ static void netdev_sync_lower_features(struct net_device *upper,
>> }
>> }
>>
>> +#define IP_CSUM_MASK (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM)
>> +
>
> Perhaps NETIF_F_IP_CSUM_MASK in netdev_features.h right below
>
> #define NETIF_F_CSUM_MASK
>
> Then again, for a stable patch we want a small patch. Then I'd define
> as a constant netdev_features_t inside the function scope.
>
> Minor: still prefix with netdev_ even though it's a static function?
Will apply all feedback. Thanks.
[...]
next prev parent reply other threads:[~2024-08-08 8:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-07 17:55 [PATCH net v3 0/3] Don't take HW USO path when packets can't be checksummed by device Jakub Sitnicki
2024-08-07 17:55 ` [PATCH net v3 1/3] net: Make USO depend on CSUM offload Jakub Sitnicki
2024-08-08 2:29 ` Willem de Bruijn
2024-08-08 8:28 ` Jakub Sitnicki [this message]
2024-08-07 17:55 ` [PATCH net v3 2/3] udp: Fall back to software USO if IPv6 extension headers are present Jakub Sitnicki
2024-08-08 2:29 ` Willem de Bruijn
2024-08-07 17:55 ` [PATCH net v3 3/3] selftests/net: Add coverage for UDP GSO with IPv6 extension headers Jakub Sitnicki
2024-08-08 2:43 ` Willem de Bruijn
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=87plqjxvu7.fsf@cloudflare.com \
--to=jakub@cloudflare.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kernel-team@cloudflare.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).