Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1505268
| From | Asbjoern Sloth Toennesen <asbjorn@asbjorn.st> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] net: l2tp_eth: fix max_mtu |
| Date | 2016-10-20 23:40 +0200 |
| Message-ID | <sutea-4By-19@gated-at.bofh.it> (permalink) |
| References | <surYJ-3VP-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Thu, 20 Oct 2016 20:08:26 +0000 (UTC), ast@asbjorn.biz wrote: > diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c > index 965f7e3..ba82dcc 100644 > --- a/net/l2tp/l2tp_eth.c > +++ b/net/l2tp/l2tp_eth.c > @@ -259,6 +259,7 @@ static int l2tp_eth_create(struct net *net, u32 tunnel_id, u32 session_id, u32 p > session->mtu = dev->mtu - session->hdr_len; > dev->mtu = session->mtu; > dev->needed_headroom += session->hdr_len; > + dev->max_mtu = ETH_MAX_MTU - dev->needed_headroom; I forgot to add that subtracting dev->needed_headroom doesn't give the exact maximum MTU, but one that is a bit too high. It could also just be set to ETH_MAX_MTU, to indicate that the encapsulation is not included. Calculations like in R. Parameswaran's patch is needed for the exact one. https://lkml.org/lkml/2016/10/17/3 -- Best regards Asbjørn Sloth Tønnesen
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] net: l2tp_eth: fix max_mtu Asbjoern Sloth Toennesen <asbjorn@asbjorn.st> - 2016-10-20 22:20 +0200
Re: [PATCH] net: l2tp_eth: fix max_mtu Asbjoern Sloth Toennesen <asbjorn@asbjorn.st> - 2016-10-20 23:40 +0200
Re: [PATCH] net: l2tp_eth: fix max_mtu Jarod Wilson <jarod@redhat.com> - 2016-10-21 05:20 +0200
csiph-web