l2tp: replace hlist with simple list for per-tunnel session list
authorJames Chapman <jchapman@katalix.com>
Thu, 20 Jun 2024 11:22:44 +0000 (12:22 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Jun 2024 10:33:34 +0000 (11:33 +0100)
commitd18d3f0a24fc4a3513495892ab1a3753628b341b
treee3f2478c6e780179fa50659e2684dd4743ec4005
parent8c6245af4fc5b6d244fb0f953d493e848d1e1387
l2tp: replace hlist with simple list for per-tunnel session list

The per-tunnel session list is no longer used by the
datapath. However, we still need a list of sessions in the tunnel for
l2tp_session_get_nth, which is used by management code. (An
alternative might be to walk each session IDR list, matching only
sessions of a given tunnel.)

Replace the per-tunnel hlist with a per-tunnel list. In functions
which walk a list of sessions of a tunnel, walk this list instead.

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_debugfs.c