[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200212210647.GB159357@dontpanic>
Date: Wed, 12 Feb 2020 22:06:47 +0100
From: William Dauchy <w.dauchy@...teo.com>
To: Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH v3 net] net, ip6_tunnel: enhance tunnel locate with link
check
Hello Nicolas,
Thank you for your review.
On Wed, Feb 12, 2020 at 04:54:19PM +0100, Nicolas Dichtel wrote:
> Hmm, I was expecting 'tdev->mtu - t_hlen'. Am I wrong?
>
> In fact, something like this:
> dev->mtu = ETH_DATA_LEN - t_hlen;
> if (t->parms.link) {
> tdev = __dev_get_by_index(t->net, t->parms.link);
> if (tdev)
> dev->mtu = tdev->mtu - t_hlen;
> }
true, I missed that one; I reworked to something like:
int mtu;
mtu = ETH_DATA_LEN;
if (t->parms.link) {
tdev = __dev_get_by_index(t->net, t->parms.link);
if (tdev && tdev->mtu < mtu)
mtu = tdev->mtu;
}
dev->mtu = mtu - t_hlen;
However in ipip we do:
mtu -= (dev->hard_header_len + t_hlen);
Do I need to use hard_header_len as well?
Thanks,
--
William
Powered by blists - more mailing lists