netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.duyck@gmail.com>
To: Eric Dumazet <edumazet@google.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, netdev <netdev@vger.kernel.org>,
	Coco Li <lixiaoyan@google.com>
Subject: Re: [PATCH net-next 05/15] ipv6/gso: remove temporary HBH/jumbo header
Date: Thu, 3 Feb 2022 16:05:17 -0800	[thread overview]
Message-ID: <CAKgT0UcGoqJ5426JrKeOAhdm5izSAB1_9+X_bbB23Ws34PKASA@mail.gmail.com> (raw)
In-Reply-To: <CANn89iLLgF6f6YQkd26OxL0Fy3hUEx2KQ+PBQ7p6w8zRUpaC_w@mail.gmail.com>

On Thu, Feb 3, 2022 at 1:42 PM Eric Dumazet <edumazet@google.com> wrote:
>
> On Thu, Feb 3, 2022 at 1:08 PM Alexander H Duyck
> <alexander.duyck@gmail.com> wrote:
> >
> > On Thu, 2022-02-03 at 11:59 -0800, Eric Dumazet wrote:
> > > On Thu, Feb 3, 2022 at 11:45 AM Alexander Duyck
> > > <alexander.duyck@gmail.com> wrote:
> > >
> > > > It is the fact that you are adding IPv6 specific code to the
> > > > net/core/skbuff.c block here. Logically speaking if you are adding the
> > > > header in ipv6_gro_receive then it really seems li:ke the logic to
> > > > remove the header really belongs in ipv6_gso_segment. I suppose this
> > > > is an attempt to optimize it though, since normally updates to the
> > > > header are done after segmentation instead of before.
> > >
> > > Right, doing this at the top level means we do the thing once only,
> > > instead of 45 times if the skb has 45 segments.
> >
> > I'm just wondering if there is a way for us to do it in
> > ipv6_gso_segment directly instead though. With this we essentially end
> > up having to free the skb if the segmentation fails anyway since it
> > won't be able to go out on the wire.
> >
>
> Having a HBH jumbo header in place while the current frame is MTU size
> (typically MTU < 9000) would
> violate the specs. A HBH jumbo header presence implies packet length > 64K.

I get that. What I was getting at was that we might be able to process
it in ipv6_gso_segment before we hand it off to either TCP or UDP gso
handlers to segment.

The general idea being we keep the IPv6 specific bits in the IPv6
specific code instead of having the skb_segment function now have to
understand IPv6 packets. So what we would end up doing is having to do
an skb_cow to replace the skb->head if any clones might be holding on
it, and then just chop off the HBH jumbo header before we start the
segmenting.

The risk would be that we waste cycles removing the HBH header for a
frame that is going to fail, but I am not sure how likely a scenario
that is or if we need to optimize for that.

  reply	other threads:[~2022-02-04  0:05 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03  1:51 [PATCH net-next 00/15] tcp: BIG TCP implementation Eric Dumazet
2022-02-03  1:51 ` [PATCH net-next 01/15] net: add netdev->tso_ipv6_max_size attribute Eric Dumazet
2022-02-03 16:34   ` Jakub Kicinski
2022-02-03 16:56     ` Eric Dumazet
2022-02-03 18:58       ` Jakub Kicinski
2022-02-03 19:12         ` Eric Dumazet
2022-02-03  1:51 ` [PATCH net-next 02/15] ipv6: add dev->gso_ipv6_max_size Eric Dumazet
2022-02-03  8:57   ` Paolo Abeni
2022-02-03 15:34     ` Eric Dumazet
2022-02-03  1:51 ` [PATCH net-next 03/15] tcp_cubic: make hystart_ack_delay() aware of BIG TCP Eric Dumazet
2022-02-03  1:51 ` [PATCH net-next 04/15] ipv6: add struct hop_jumbo_hdr definition Eric Dumazet
2022-02-03  1:51 ` [PATCH net-next 05/15] ipv6/gso: remove temporary HBH/jumbo header Eric Dumazet
2022-02-03 18:53   ` Alexander H Duyck
2022-02-03 19:17     ` Eric Dumazet
2022-02-03 19:45       ` Alexander Duyck
2022-02-03 19:59         ` Eric Dumazet
2022-02-03 21:08           ` Alexander H Duyck
2022-02-03 21:41             ` Eric Dumazet
2022-02-04  0:05               ` Alexander Duyck [this message]
2022-02-04  0:27                 ` Eric Dumazet
2022-02-04  1:14                   ` Eric Dumazet
2022-02-04  1:48                     ` Eric Dumazet
2022-02-04  2:15                       ` Eric Dumazet
2022-02-03  1:51 ` [PATCH net-next 06/15] ipv6/gro: insert " Eric Dumazet
2022-02-03  9:19   ` Paolo Abeni
2022-02-03 15:48     ` Eric Dumazet
2022-02-03  1:51 ` [PATCH net-next 07/15] ipv6: add GRO_IPV6_MAX_SIZE Eric Dumazet
2022-02-03  2:18   ` Eric Dumazet
2022-02-03 10:44   ` Paolo Abeni
2022-02-03  1:51 ` [PATCH net-next 08/15] ipv6: Add hop-by-hop header to jumbograms in ip6_output Eric Dumazet
2022-02-03  9:07   ` Paolo Abeni
2022-02-03 16:31     ` Eric Dumazet
2022-02-03  1:51 ` [PATCH net-next 09/15] net: increase MAX_SKB_FRAGS Eric Dumazet
2022-02-03  5:02   ` kernel test robot
2022-02-03  5:20     ` Eric Dumazet
2022-02-03  5:31       ` Jakub Kicinski
2022-02-03  6:35         ` Eric Dumazet
2022-02-03  5:23   ` kernel test robot
2022-02-03  5:43   ` kernel test robot
2022-02-03 16:01   ` Paolo Abeni
2022-02-03 17:26   ` Alexander H Duyck
2022-02-03 17:34     ` Eric Dumazet
2022-02-03 17:56       ` Alexander Duyck
2022-02-03 19:18         ` Jakub Kicinski
2022-02-03 19:20           ` Eric Dumazet
2022-02-03 19:54             ` Eric Dumazet
2022-02-04 10:18         ` David Laight
2022-02-04 15:46           ` Alexander Duyck
2022-02-03  1:51 ` [PATCH net-next 10/15] net: loopback: enable BIG TCP packets Eric Dumazet
2022-02-03  1:51 ` [PATCH net-next 11/15] bonding: update dev->tso_ipv6_max_size Eric Dumazet
2022-02-03  1:51 ` [PATCH net-next 12/15] macvlan: enable BIG TCP Packets Eric Dumazet
2022-02-03  1:51 ` [PATCH net-next 13/15] ipvlan: " Eric Dumazet
2022-02-03  1:51 ` [PATCH net-next 14/15] mlx4: support BIG TCP packets Eric Dumazet
2022-02-03 13:04   ` Tariq Toukan
2022-02-03 15:54     ` Eric Dumazet
2022-02-03  1:51 ` [PATCH net-next 15/15] mlx5: " Eric Dumazet
2022-02-03  7:27   ` Tariq Toukan
2022-02-04  4:03   ` 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=CAKgT0UcGoqJ5426JrKeOAhdm5izSAB1_9+X_bbB23Ws34PKASA@mail.gmail.com \
    --to=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=kuba@kernel.org \
    --cc=lixiaoyan@google.com \
    --cc=netdev@vger.kernel.org \
    /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).