From: Florian Westphal <fw@strlen.de>
To: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Florian Westphal <fw@strlen.de>,
Eric Dumazet <edumazet@google.com>,
Hannes Frederic Sowa <hannes@stressinduktion.org>,
shmulik.ladkani@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH] net: ip_finish_output_gso: If skb_gso_network_seglen exceeds MTU, do segmentation even for non IPSKB_FORWARDED skbs
Date: Tue, 5 Jul 2016 15:03:27 +0200 [thread overview]
Message-ID: <20160705130327.GA10737@breakpoint.cc> (raw)
In-Reply-To: <1467722132-10084-1-git-send-email-shmulik.ladkani@ravellosystems.com>
Shmulik Ladkani <shmulik.ladkani@ravellosystems.com> wrote:
> Given:
> - tap0, vxlan0 enslaved under a bridge
> - eth0 is the tunnel underlay having small mtu (e.g. 1400)
>
> Assume GSO skbs arriving from tap0 having a gso_size as determined by
> user-provided virtio_net_hdr (e.g. 1460 corresponding to VM mtu of 1500).
>
> After encapsulation these skbs have skb_gso_network_seglen that exceed
> underlay ip_skb_dst_mtu.
>
> These skbs are accidentally passed to ip_finish_output2 AS IS; however
> each final segment (either segmented by validate_xmit_skb of eth0, or
> by eth0 hardware UFO) would be larger than eth0 mtu.
> As a result, those above-mtu segments get dropped on certain underlay
> networks.
>
> The expected behavior in such a setup would be segmenting the skb first,
> and then fragmenting each segment according to dst mtu, and finally
> passing the resulting fragments to ip_finish_output2.
>
> 'ip_finish_output_gso' already supports this "Slowpath" behavior,
> but it is only considered if IPSKB_FORWARDED is set.
>
> However in the bridged case, IPSKB_FORWARDED is off, and the "Slowpath"
> behavior is not considered.
I placed this test there under the assumption that L2 bridges have
the same MTU on all bridge ports, so we'd only need to consider routing
case.
How does work if e.g. 1460-sized udp packet arrives on tap0?
Do we fragment (possibly ignoring DF?)
How does it work for non-ip protocols?
(Or did I misunderstand this setup...?)
next prev parent reply other threads:[~2016-07-05 13:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-05 12:35 [PATCH] net: ip_finish_output_gso: If skb_gso_network_seglen exceeds MTU, do segmentation even for non IPSKB_FORWARDED skbs Shmulik Ladkani
2016-07-05 13:03 ` Florian Westphal [this message]
2016-07-05 14:05 ` Shmulik Ladkani
2016-07-09 3:12 ` David Miller
2016-07-09 9:06 ` Florian Westphal
2016-07-09 9:00 ` Florian Westphal
2016-07-09 12:30 ` Shmulik Ladkani
2016-07-09 13:22 ` Florian Westphal
2016-07-10 7:51 ` Shmulik Ladkani
2016-07-11 8:15 ` Florian Westphal
2016-07-11 13:32 ` Hannes Frederic Sowa
2016-07-12 5:56 ` Shmulik Ladkani
2016-07-13 14:00 ` Shmulik Ladkani
2016-07-14 13:12 ` Hannes Frederic Sowa
2016-07-14 14:13 ` Shmulik Ladkani
2016-07-14 23:32 ` Hannes Frederic Sowa
2016-07-10 20:14 ` Shmulik Ladkani
2016-07-11 8:13 ` Florian Westphal
2016-07-09 15:10 ` Hannes Frederic Sowa
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=20160705130327.GA10737@breakpoint.cc \
--to=fw@strlen.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hannes@stressinduktion.org \
--cc=netdev@vger.kernel.org \
--cc=shmulik.ladkani@gmail.com \
--cc=shmulik.ladkani@ravellosystems.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).