From: Florian Westphal <fw@strlen.de>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Florian Westphal <fw@strlen.de>,
Herbert Xu <herbert@gondor.apana.org.au>,
netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] net: ip, ipv6: handle gso skbs in forwarding path
Date: Wed, 29 Jan 2014 12:00:24 +0100 [thread overview]
Message-ID: <20140129110024.GG30123@breakpoint.cc> (raw)
In-Reply-To: <1390926883.28432.12.camel@edumazet-glaptop2.roam.corp.google.com>
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > > Its still unclear if this is the best strategy.
> > >
> > > TCP stream not using DF flag are very unlikely to care if we adjust
> > > their MTU (lowering gso_size) at this point ?
> >
> > Thanks for this suggestion. It would indeed be nice to avoid sw
> > segmentation. I tried:
> >
> > 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);
FWIW Erics idea works fine with:
headerlen = skb_transport_header(skb) - skb_network_header(skb);
if (likely(skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)))
headerlen += tcp_hdrlen(skb);
skb_shinfo(skb)->gso_size = mtu - headerlen;
and disabling 'sg' on outgoing (lower-mtu) interface. [ else BUG() ]
> > [ 28.644776] kernel BUG at net/net/core/skbuff.c:2984!
>
> Yep, lets CC Herbert Xu, as he 'owns' skb_segment()
>
> BUG_ON(skb_headlen(fskb));
next prev parent reply other threads:[~2014-01-29 11:00 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 [this message]
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
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=20140129110024.GG30123@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).