From: William Dauchy <w.dauchy@criteo.com>
To: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH v3 net] net, ip6_tunnel: enhance tunnel locate with link check
Date: Thu, 13 Feb 2020 16:26:46 +0100 [thread overview]
Message-ID: <20200213152646.GA169249@dontpanic> (raw)
In-Reply-To: <cc378ec7-03ec-58ec-e3c9-158fb02b283e@6wind.com>
On Thu, Feb 13, 2020 at 10:34:19AM +0100, Nicolas Dichtel wrote:
> > mtu = ETH_DATA_LEN;
> > if (t->parms.link) {
> > tdev = __dev_get_by_index(t->net, t->parms.link);
> > if (tdev && tdev->mtu < mtu)
> Why this second condition? Why not allowing more than ETH_DATA_LEN (1500)?
> ip_tunnels do:
> if (tdev) {
>
> hlen = tdev->hard_header_len + tdev->needed_headroom;
>
> mtu = min(tdev->mtu, IP_MAX_MTU);
>
> }
> which seems better.
I wrongly mixed the two codes in my head as I wanted to take the lowest
of the two values; will correct that; sorry for the confusion.
> Note also that you patch ip6_tnl_dev_init_gen(), but ip6_tnl_link_config() is
> called later and may adjust the mtu. I would suggest to take care of link mtu in
> ip6_tnl_link_config().
agreed, I overlooked it. Unsure whether I can put it in CAP_XMIT
condition as well.
> hard_header_len is not set for ipv4 tunnels, but for ipv6 tunnels:
> dev->hard_header_len = LL_MAX_HEADER + t_hlen;
>
> This is not the real value, I don't think you can calculate the real mtu based
> on this.
understood, I indeed did not noticed hard_header_len was not set in
ip_tunnel.
Best,
--
William
next prev parent reply other threads:[~2020-02-13 15:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-05 14:57 [PATCH] net, ip6_tunnel: enhance tunnel locate with link/type check William Dauchy
2020-02-05 15:04 ` Nicolas Dichtel
2020-02-05 16:29 ` [PATCH v2 0/2] net, ip6_tunnel: enhance tunnel locate William Dauchy
2020-02-05 16:29 ` [PATCH v2 1/2] net, ip6_tunnel: enhance tunnel locate with link check William Dauchy
2020-02-05 16:54 ` Nicolas Dichtel
2020-02-05 17:36 ` William Dauchy
2020-02-12 8:30 ` [PATCH v3 net] " William Dauchy
2020-02-12 15:54 ` Nicolas Dichtel
2020-02-12 21:06 ` William Dauchy
2020-02-13 9:34 ` Nicolas Dichtel
2020-02-13 15:26 ` William Dauchy [this message]
2020-02-13 15:35 ` [PATCH v4 " William Dauchy
2020-02-13 16:33 ` Nicolas Dichtel
2020-02-13 17:19 ` [PATCH v5 " William Dauchy
2020-02-14 9:50 ` Nicolas Dichtel
2020-02-14 15:32 ` David Miller
2020-02-05 16:29 ` [PATCH v2 2/2] net, ip6_tunnel: enhance tunnel locate with type check William Dauchy
2020-02-05 16:59 ` Nicolas Dichtel
2020-02-05 17:31 ` William Dauchy
2020-02-05 18:16 ` William Dauchy
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=20200213152646.GA169249@dontpanic \
--to=w.dauchy@criteo.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.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).