kernel_optimize_test/net/l2tp
Guillaume Nault 789141b215 l2tp: simplify MTU handling in l2tp_ppp
The value of the session's .mtu field, as defined by
pppol2tp_connect() or pppol2tp_session_create(), is later overwritten
by pppol2tp_session_init() (unless getting the tunnel's socket PMTU
fails). This field is then only used when setting the PPP channel's MTU
in pppol2tp_connect().
Furthermore, the SIOC[GS]IFMTU ioctls only act on the session's .mtu
without propagating this value to the PPP channel, making them useless.

This patch initialises the PPP channel's MTU directly and ignores the
session's .mtu entirely. MTU is still computed by subtracting the
PPPOL2TP_HEADER_OVERHEAD constant. It is not optimal, but that doesn't
really matter: po->chan.mtu is only used when the channel is part of a
multilink PPP bundle. Running multilink PPP over packet switched
networks is certainly not going to be efficient, so not picking the
best MTU does not harm (in the worst case, packets will just be
fragmented by the underlay).

The SIOC[GS]IFMTU ioctls are removed entirely (as opposed to simply
ignored), because these ioctls commands are part of the requests that
should be handled generically by the socket layer. PX_PROTO_OL2TP was
the only socket type abusing these ioctls.

Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-08-03 10:03:57 -07:00
..
Kconfig
l2tp_core.c l2tp: drop ->mru from struct l2tp_session 2018-07-27 13:34:53 -07:00
l2tp_core.h l2tp: define l2tp_tunnel_dst_mtu() 2018-08-03 10:03:57 -07:00
l2tp_debugfs.c l2tp: drop ->mru from struct l2tp_session 2018-07-27 13:34:53 -07:00
l2tp_eth.c l2tp: define l2tp_tunnel_dst_mtu() 2018-08-03 10:03:57 -07:00
l2tp_ip.c l2tp: remove ->recv_payload_hook 2018-07-26 14:06:34 -07:00
l2tp_ip6.c l2tp: remove ->recv_payload_hook 2018-07-26 14:06:34 -07:00
l2tp_netlink.c l2tp: drop ->mru from struct l2tp_session 2018-07-27 13:34:53 -07:00
l2tp_ppp.c l2tp: simplify MTU handling in l2tp_ppp 2018-08-03 10:03:57 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00