netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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, netdev@vger.kernel.org
Subject: Re: [PATCH net 4/4] udp: prevent local UDP tunnel packets from being GROed
Date: Mon, 18 Mar 2024 09:43:57 +0100	[thread overview]
Message-ID: <171075143709.25781.8757835262812630133@kwain> (raw)
In-Reply-To: <65f5be1e42018_6ef3e29485@willemb.c.googlers.com.notmuch>

Hello,

Quoting Willem de Bruijn (2024-03-16 16:43:26)
> Antoine Tenart wrote:
> > GRO has a fundamental issue with UDP tunnel packets as it can't detect
> > those in a foolproof way and GRO could happen before they reach the
> > tunnel endpoint. Previous commits have fixed issues when UDP tunnel
> > packets come from a remote host, but if those packets are issued locally
> > they could run into checksum issues.
> > 
> > If the inner packet has a partial checksum the information will be lost
> > in the GRO logic, either in udp4/6_gro_complete or in
> > udp_gro_complete_segment and packets will have an invalid checksum when
> > leaving the host.
> 
> Before the previous patch, the tunnel code would convert ip_summed to
> CHECKSUM_UNNECESSARY. After that patch CHECKSUM_PARTIAL is preserved.
> Are the tunneled packets still corrupted once forwarded to the egress
> path? In principle CHECKSUM partial with tunnel and GSO should work,
> whether built as such or arrived at through GRO.

Previous patch removed the partial -> unnecessary conversion for
fraglist only; but packets GROed by rx-udp-gro-forwarding can hit
udp_gro_complete_segment and the partial info would be overwritten
there in case of an UDP tunnel packet GROed at the UDP level with the
inner csum being partial.

Thanks!
Antoine

      reply	other threads:[~2024-03-18  8:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15 15:17 [PATCH net 0/4] gro: various fixes related to UDP tunnels Antoine Tenart
2024-03-15 15:17 ` [PATCH net 1/4] udp: do not accept non-tunnel GSO skbs landing in a tunnel Antoine Tenart
2024-03-15 21:21   ` kernel test robot
2024-03-18 10:03     ` Antoine Tenart
2024-03-15 21:43   ` kernel test robot
2024-03-16 14:05   ` Willem de Bruijn
2024-03-15 15:17 ` [PATCH net 2/4] gro: fix ownership transfer Antoine Tenart
2024-03-16 15:25   ` Willem de Bruijn
2024-03-18  9:09     ` Antoine Tenart
2024-03-15 15:17 ` [PATCH net 3/4] udp: do not transition UDP fraglist to unnecessary checksum Antoine Tenart
2024-03-15 15:17 ` [PATCH net 4/4] udp: prevent local UDP tunnel packets from being GROed Antoine Tenart
2024-03-16 15:43   ` Willem de Bruijn
2024-03-18  8:43     ` Antoine Tenart [this message]

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=171075143709.25781.8757835262812630133@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;
as well as URLs for NNTP newsgroup(s).