]> git.ipfire.org Git - thirdparty/linux.git/commit
l2tp: use get_next APIs for management requests and procfs/debugfs
authorJames Chapman <jchapman@katalix.com>
Wed, 7 Aug 2024 06:54:49 +0000 (07:54 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Aug 2024 03:38:49 +0000 (04:38 +0100)
commit1f4c3dce9112d23145b4f8bbfd3793a1c4c517ab
tree9926262d0fa1001500bea346f7335c53b7733c04
parentaa92c1cec92b146fe499fb693688d6d3d6bafad9
l2tp: use get_next APIs for management requests and procfs/debugfs

l2tp netlink and procfs/debugfs iterate over tunnel and session lists
to obtain data. They currently use very inefficient get_nth functions
to do so. Replace these with get_next.

For netlink, use nl cb->ctx[] for passing state instead of the
obsolete cb->args[].

l2tp_tunnel_get_nth and l2tp_session_get_nth are no longer used so
they can be removed.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-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_debugfs.c
net/l2tp/l2tp_netlink.c
net/l2tp/l2tp_ppp.c