netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Felix Fietkau <nbd@nbd.name>,
	Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	netdev@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
	"David S. Miller" <davem@davemloft.net>,
	David Ahern <dsahern@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 2/4] net: add support for segmenting TCP fraglist GSO packets
Date: Fri, 26 Apr 2024 10:00:22 +0200	[thread overview]
Message-ID: <ab75baa2c972859df01a29494fb17ad4b0cc0bab.camel@redhat.com> (raw)
In-Reply-To: <1bc0ac3d-b18d-4969-a090-6803fa4dd5b4@nbd.name>

On Thu, 2024-04-25 at 09:51 +0200, Felix Fietkau wrote:
> On 25.04.24 05:03, Willem de Bruijn wrote:
> > Felix Fietkau wrote:
> > > Preparation for adding TCP fraglist GRO support. It expects packets to be
> > > combined in a similar way as UDP fraglist GSO packets.
> > > One difference is the fact that this code assumes that the TCP flags of
> > > all packets have the same value. This allows simple handling of flags
> > > mutations.
> > 
> > Can you clarify this some more? We expect potentially different flags
> > on first and last packet in a TSO train. With fraglist, the segments
> > keep their original flags, as the headers are only pulled. When do
> > segment flags need to be replaced with those of the first segment?
> 
> Maybe I just misunderstood a comment that Paolo made earlier regarding 
> TCP header mutations. Will review this again and compare with regular TSO.

I likely was not clear, I'm sorry.

Let me try to rephrase. After the GRO stage, and before segmentation,
the stack could change other fields inside the TCP header (beyond
src/dst port). e.g. nftables can clear the ECN bit, or strip all the
TCP options.

The frag_list segmentation should catch such changes and update the
individual segments csum accordingly.

Note that even IPv6 could snat/dnat a packet!

The GRO stage allows aggregating with different flags. Later on, at
segmentation stage, all the individual packets except the last one will
retain the same flags of the first segment, except for the PUSH and FIN
bit, that will be cleared. The last segment will have such bit value
preserved.

Cheers,

Paolo


  reply	other threads:[~2024-04-26  8:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-24 18:04 [PATCH net-next 0/4] Add TCP fraglist GRO support Felix Fietkau
2024-04-24 18:04 ` [PATCH net-next 1/4] net: move skb_gro_receive_list from udp to core Felix Fietkau
2024-04-24 18:04 ` [PATCH net-next 2/4] net: add support for segmenting TCP fraglist GSO packets Felix Fietkau
2024-04-25  3:03   ` Willem de Bruijn
2024-04-25  7:51     ` Felix Fietkau
2024-04-26  8:00       ` Paolo Abeni [this message]
2024-04-24 18:04 ` [PATCH net-next 3/4] net: add code for TCP fraglist GRO Felix Fietkau
2024-04-26  8:14   ` Paolo Abeni
2024-04-24 18:04 ` [PATCH net-next 4/4] net: add heuristic for enabling " Felix Fietkau
2024-04-24 18:23   ` Eric Dumazet
2024-04-24 18:48     ` Felix Fietkau
2024-04-25  7:44   ` kernel test robot
2024-04-25  9:30   ` kernel test robot

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=ab75baa2c972859df01a29494fb17ad4b0cc0bab.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --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).