summaryrefslogtreecommitdiff
path: root/net/l2tp
diff options
context:
space:
mode:
authorQingfang Deng <dqfext@gmail.com>2025-03-01 21:55:16 +0800
committerJakub Kicinski <kuba@kernel.org>2025-03-04 17:11:17 -0800
commit95d0d094ba26432ec467e2260f4bf553053f1f8f (patch)
tree7c3aae6663bbf9ee26d1830ac623483488b86046 /net/l2tp
parent00d66b5fcd4f9d1d8419b7c418575d1f2cd91cb5 (diff)
downloadlinux-95d0d094ba26432ec467e2260f4bf553053f1f8f.tar.gz
linux-95d0d094ba26432ec467e2260f4bf553053f1f8f.tar.bz2
linux-95d0d094ba26432ec467e2260f4bf553053f1f8f.zip
ppp: use IFF_NO_QUEUE in virtual interfaces
For PPPoE, PPTP, and PPPoL2TP, the start_xmit() function directly forwards packets to the underlying network stack and never returns anything other than 1. So these interfaces do not require a qdisc, and the IFF_NO_QUEUE flag should be set. Introduces a direct_xmit flag in struct ppp_channel to indicate when IFF_NO_QUEUE should be applied. The flag is set in ppp_connect_channel() for relevant protocols. While at it, remove the usused latency member from struct ppp_channel. Signed-off-by: Qingfang Deng <dqfext@gmail.com> Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com> Link: https://patch.msgid.link/20250301135517.695809-1-dqfext@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/l2tp')
-rw-r--r--net/l2tp/l2tp_ppp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
index 53baf2dd5d5d..fc5c2fd8f34c 100644
--- a/net/l2tp/l2tp_ppp.c
+++ b/net/l2tp/l2tp_ppp.c
@@ -806,6 +806,7 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr,
po->chan.private = sk;
po->chan.ops = &pppol2tp_chan_ops;
po->chan.mtu = pppol2tp_tunnel_mtu(tunnel);
+ po->chan.direct_xmit = true;
error = ppp_register_net_channel(sock_net(sk), &po->chan);
if (error) {