From: Paolo Abeni <pabeni@redhat.com>
To: Radharapu Rakesh <rakesh.radharapu@amd.com>,
git@amd.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, horms@kernel.org, kuniyu@amazon.com,
bigeasy@linutronix.de
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
harini.katakam@amd.com, radhey.shyam.pandey@amd.com,
michal.simek@amd.com
Subject: Re: [RFC PATCH net-next] net: Modify CSUM capability check for USO
Date: Wed, 12 Mar 2025 17:14:21 +0100 [thread overview]
Message-ID: <0b1cdac7-662a-4e27-b8b0-836cdba1d460@redhat.com> (raw)
In-Reply-To: <20250312115400.773516-1-rakesh.radharapu@amd.com>
On 3/12/25 12:54 PM, Radharapu Rakesh wrote:
> net/core/dev.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 1cb134ff7327..a22f8f6e2ed1 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -10465,11 +10465,13 @@ static void netdev_sync_lower_features(struct net_device *upper,
>
> static bool netdev_has_ip_or_hw_csum(netdev_features_t features)
> {
> - netdev_features_t ip_csum_mask = NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
> - bool ip_csum = (features & ip_csum_mask) == ip_csum_mask;
> + netdev_features_t ipv4_csum_mask = NETIF_F_IP_CSUM;
> + netdev_features_t ipv6_csum_mask = NETIF_F_IPV6_CSUM;
> + bool ipv4_csum = (features & ipv4_csum_mask) == ipv4_csum_mask;
> + bool ipv6_csum = (features & ipv6_csum_mask) == ipv6_csum_mask;
> bool hw_csum = features & NETIF_F_HW_CSUM;
>
> - return ip_csum || hw_csum;
> + return ipv4_csum || ipv6_csum || hw_csum;
> }
The above will additionally affect TLS offload, and will likely break
i.e. USO over IPv6 traffic landing on devices supporting only USO over
IPv4, unless such devices additionally implement a suitable
ndo_features_check().
Such situation will be quite bug prone, I'm unsure we want this kind of
change - even without looking at the TLS side of it.
/P
next prev parent reply other threads:[~2025-03-12 16:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-12 11:54 Radharapu Rakesh
2025-03-12 16:14 ` Paolo Abeni [this message]
2025-03-12 16:59 ` Radharapu, Rakesh
2025-03-16 2:04 ` Willem de Bruijn
2025-03-18 7:01 ` Radharapu, Rakesh
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=0b1cdac7-662a-4e27-b8b0-836cdba1d460@redhat.com \
--to=pabeni@redhat.com \
--cc=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=git@amd.com \
--cc=harini.katakam@amd.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@amazon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=netdev@vger.kernel.org \
--cc=radhey.shyam.pandey@amd.com \
--cc=rakesh.radharapu@amd.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
all inboxes | Powered by JetHome®