Skip to contentSkip to conversation

l2tp: ppp: remove unused backlog callback

PATCH Superseded Qingfang Deng 2 participants 2 messages Oct 30

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 l2tp: ppp: remove unused backlog callback

PPPoL2TP sessions receive packets through pppol2tp_recv(), which passes packets directly to PPP or queues them on sk_receive_queue. No receive path queues packets on the session socket backlog or calls sk_receive_skb() with that socket, so pppol2tp_backlog_recv() is unused.

Remove the unused callback. L2TP/IP control sockets retain their separate backlog callbacks. Selftests passed.

---
 net/l2tp/l2tp_ppp.c | 12 ------------
 1 file changed, 12 deletions(-)
net/l2tp/l2tp_ppp.c +0 -12
index 4f311d473a64..15e02864bfd5 100644
@@ -454,17 +454,6 @@ static struct proto pppol2tp_sk_proto = {
 	.obj_size = sizeof(struct pppox_sock),
 };
 
-static int pppol2tp_backlog_recv(struct sock *sk, struct sk_buff *skb)
-{
-	int rc;
-
-	rc = l2tp_udp_encap_recv(sk, skb);
-	if (rc)
-		kfree_skb(skb);
-
-	return NET_RX_SUCCESS;
-}
-
 /* socket() handler. Initialize a new struct sock.
  */
 static int pppol2tp_create(struct net *net, struct socket *sock, int kern)
@@ -482,7 +471,6 @@ static int pppol2tp_create(struct net *net, struct socket *sock, int kern)
 	sock->state  = SS_UNCONNECTED;
 	sock->ops    = &pppol2tp_ops;
 
-	sk->sk_backlog_rcv = pppol2tp_backlog_recv;
 	sk->sk_protocol	   = PX_PROTO_OL2TP;
 	sk->sk_family	   = PF_PPPOX;
 	sk->sk_state	   = PPPOX_NONE;
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 4 lines · On Fri, 30 Oct 2026 15:00:03 +0800 Qingfang Deng wrote:

PPPoL2TP sessions receive packets through pppol2tp_recv(), which passes packets directly to PPP or queues them on sk_receive_queue. No receive path queues packets on the session socket backlog or calls sk_receive_skb() with that socket, so pppol2tp_backlog_recv() is unused.

## Form letter - net-next-closed

The merge window for Linux v7.4 has begun, and the net-next tree is now closed for new drivers, features, code refactoring and optimizations. We are currently accepting bug fixes only.

Please repost when net-next reopens. There is some uncertainty about how long this merge window will last, so please check
https://netdev.bots.linux.dev/net-next.html
before reposting. net-next _may_ reopen on Nov 2nd.

See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle

Signature · 2 lines
pw-bot: defer
pv-bot: closed