netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: davem@davemloft.net, petrm@mellanox.com, idosch@mellanox.com,
	netdev@vger.kernel.org
Subject: Re: [PATCH net 1/2] ip_tunnel: restore binding to ifaces with a large mtu
Date: Wed, 30 May 2018 23:29:04 +0300	[thread overview]
Message-ID: <20180530202904.GA23937@splinter> (raw)
In-Reply-To: <20180530082843.6076-2-nicolas.dichtel@6wind.com>

On Wed, May 30, 2018 at 10:28:42AM +0200, Nicolas Dichtel wrote:
> After commit f6cc9c054e77, the following conf is broken (note that the
> default loopback mtu is 65536, ie IP_MAX_MTU + 1):
> 
> $ ip tunnel add gre1 mode gre local 10.125.0.1 remote 10.125.0.2 dev lo
> add tunnel "gre0" failed: Invalid argument
> $ ip l a type dummy
> $ ip l s dummy1 up
> $ ip l s dummy1 mtu 65535
> $ ip tunnel add gre1 mode gre local 10.125.0.1 remote 10.125.0.2 dev dummy1
> add tunnel "gre0" failed: Invalid argument
> 
> dev_set_mtu() doesn't allow to set a mtu which is too large.
> First, let's cap the mtu returned by ip_tunnel_bind_dev(). Second, remove
> the magic value 0xFFF8 and use IP_MAX_MTU instead.
> 0xFFF8 seems to be there for ages, I don't know why this value was used.
> 
> With a recent kernel, it's also possible to set a mtu > IP_MAX_MTU:
> $ ip l s dummy1 mtu 66000
> After that patch, it's also possible to bind an ip tunnel on that kind of
> interface.
> 
> CC: Petr Machata <petrm@mellanox.com>
> CC: Ido Schimmel <idosch@mellanox.com>
> Link: https://git.kernel.org/pub/scm/linux/kernel/git/davem/netdev-vger-cvs.git/commit/?id=e5afd356a411a
> Fixes: f6cc9c054e77 ("ip_tunnel: Emit events for post-register MTU changes")
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

Reviewed-by: Ido Schimmel <idosch@mellanox.com>

There is another instance of this magic number in the file, but it's
written in lower case so you might have missed it - see
ip_tunnel_newlink(). Can you please take care of it in v2?

Thanks for the fix, Nicolas!

  reply	other threads:[~2018-05-30 20:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-30  8:28 [PATCH net 0/2] ip[6] tunnels: fix mtu calculations Nicolas Dichtel
2018-05-30  8:28 ` [PATCH net 1/2] ip_tunnel: restore binding to ifaces with a large mtu Nicolas Dichtel
2018-05-30 20:29   ` Ido Schimmel [this message]
2018-05-31  8:52     ` Nicolas Dichtel
2018-05-31  8:59     ` [PATCH net v2 0/2] ip[6] tunnels: fix mtu calculations Nicolas Dichtel
2018-05-31  8:59       ` [PATCH net v2 1/2] ip_tunnel: restore binding to ifaces with a large mtu Nicolas Dichtel
2018-05-31  8:59       ` [PATCH net v2 2/2] ip6_tunnel: remove magic mtu value 0xFFF8 Nicolas Dichtel
2018-06-01 17:57       ` [PATCH net v2 0/2] ip[6] tunnels: fix mtu calculations David Miller
2018-06-04  7:56         ` Nicolas Dichtel
2018-05-30  8:28 ` [PATCH net 2/2] ip6_tunnel: remove magic mtu value 0xFFF8 Nicolas Dichtel

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=20180530202904.GA23937@splinter \
    --to=idosch@idosch.org \
    --cc=davem@davemloft.net \
    --cc=idosch@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=petrm@mellanox.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).