From: Florian Westphal <fw@strlen.de>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Florian Westphal <fw@strlen.de>,
Eric Dumazet <eric.dumazet@gmail.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] net: ip, ipv6: handle gso skbs in forwarding path
Date: Mon, 10 Feb 2014 13:43:46 +0100 [thread overview]
Message-ID: <20140210124346.GA6329@breakpoint.cc> (raw)
In-Reply-To: <20140210123124.GA28752@gondor.apana.org.au>
Herbert Xu <herbert@gondor.apana.org.au> wrote:
> On Mon, Feb 10, 2014 at 01:23:31PM +0100, Florian Westphal wrote:
> > Herbert Xu <herbert@gondor.apana.org.au> wrote:
> > > > > static void ip_gso_adjust_seglen(struct sk_buff *skb)
> > > > > {
> > > > > unsigned int mtu;
> > > > >
> > > > > if (!skb_is_gso(skb))
> > > > > return;
> > > > >
> > > > > mtu = ip_dst_mtu_maybe_forward(skb_dst(skb), true);
> > > > > skb_shinfo(skb)->gso_size = mtu - sizeof(struct iphdr);
> > > > > }
> > > > >
> > > > > But this yields
> > > > >
> > > > > [ 28.644776] kernel BUG at net/net/core/skbuff.c:2984!
> > > >
> > > > Yep, lets CC Herbert Xu, as he 'owns' skb_segment()
> > >
> > > IMHO we should just stop merging ~DF packets altogether, at least
> > > for TCP.
> >
> > Eric, you added DF aggregation in db8caf3dbc77599dc90f4ea0a803cd1d97116f30
> > (gro: should aggregate frames without DF).
> >
> > I guess you don't want to revert this commit?
> > Any other ideas?
> >
> > skb_gso_segment() is already very complex, I don't want to add more code
> > to it. And that seems unavoidable if we need to de-couple nr_frags and
> > gso_size.
>
> I don't think adding all this complexity just to be able to
> aggregate ~DF packets (which are just wrong to begin with) is
> worth it.
>
> If aggregating ~DF packets was a one-liner then sure, but there
> is a reason why I didn't aggregate them in the first place and
> you've found it :)
Well we could go with my original patch that will do software
segmentation on ~DF packets in the forwarding path if the outmtu is too
small for the individual packets. The output path then simply
creates fragments.
Eric suggested to shrink gso_size instead to avoid segmentation+fragments.
I think its nice idea, but skb_gso_segment makes certain assumptions about
nr_frags and gso_size (it can't handle frag size > desired mss).
Hannes pointed out that we'd also need to deal with
SKB_MAX_FRAGS * gso_size exceeding fragments.
Quite frankly, I'd prefer to go with
skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK);
The scenario is rare anyway given the number of bug reports (or lack
thereof) about '~DF tcp doesn't work with gro in fwd path when output
mtu is too small'.
Its not like this could never be improved later on.
Best regards,
Florian
next prev parent reply other threads:[~2014-02-10 12:43 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-27 8:22 [PATCH 1/2] net: add and use skb_gso_transport_seglen() Florian Westphal
2014-01-27 8:22 ` [PATCH 2/2] net: ip, ipv6: handle gso skbs in forwarding path Florian Westphal
2014-01-27 8:34 ` David Miller
2014-01-27 8:36 ` Florian Westphal
2014-01-27 18:22 ` Eric Dumazet
2014-01-27 20:58 ` David Miller
2014-01-27 21:08 ` David Miller
2014-01-28 0:27 ` Hannes Frederic Sowa
2014-01-28 9:12 ` Florian Westphal
2014-01-29 10:53 ` Florian Westphal
2014-01-29 11:04 ` Hannes Frederic Sowa
2014-01-28 8:57 ` Florian Westphal
2014-01-28 16:34 ` Eric Dumazet
2014-01-28 17:15 ` Florian Westphal
2014-01-28 17:30 ` Eric Dumazet
2014-01-28 17:37 ` Florian Westphal
2014-01-29 11:00 ` Florian Westphal
2014-02-09 2:55 ` Herbert Xu
2014-02-10 12:23 ` Florian Westphal
2014-02-10 12:31 ` Herbert Xu
2014-02-10 12:43 ` Florian Westphal [this message]
2014-02-10 12:50 ` Herbert Xu
2014-02-10 13:08 ` Eric Dumazet
2014-02-10 13:15 ` Eric Dumazet
2014-02-10 13:12 ` Eric Dumazet
2014-01-27 8:30 ` [PATCH 1/2] net: add and use skb_gso_transport_seglen() David Miller
-- strict thread matches above, loose matches on Subject: below --
2014-02-22 9:33 [PATCH stable 3.4.y 0/2] gso/gro forwarding changeset Florian Westphal
2014-02-22 9:33 ` [PATCH 2/2] net: ip, ipv6: handle gso skbs in forwarding path Florian Westphal
2014-01-25 22:48 [PATCH 0/2] Fix handling of GRO " Florian Westphal
2014-01-25 22:48 ` [PATCH 2/2] net: ip, ipv6: handle gso " Florian Westphal
2014-01-26 1:37 ` Eric Dumazet
2014-01-26 9:22 ` Florian Westphal
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=20140210124346.GA6329@breakpoint.cc \
--to=fw@strlen.de \
--cc=eric.dumazet@gmail.com \
--cc=herbert@gondor.apana.org.au \
--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).