l2tp: use IDR for all session lookups
authorJames Chapman <jchapman@katalix.com>
Thu, 20 Jun 2024 11:22:42 +0000 (12:22 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Jun 2024 10:33:34 +0000 (11:33 +0100)
commit5f77c18ea55601822f9c495135a5b5d4b499d647
tree35132dc1ebab67d9db484685821a6c540b470921
parentc37e0138ca5f3be6b69c3020470aecb94eb5d773
l2tp: use IDR for all session lookups

Add generic session getter which uses IDR. Replace all users of
l2tp_tunnel_get_session which uses the per-tunnel session list to use
the generic getter.

Signed-off-by: James Chapman <jchapman@katalix.com>
Reviewed-by: Tom Parkin <tparkin@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_core.c
net/l2tp/l2tp_core.h
net/l2tp/l2tp_netlink.c
net/l2tp/l2tp_ppp.c