Lines Matching refs:pn

134 l2tp_session_id_hash_2(struct l2tp_net *pn, u32 session_id)  in l2tp_session_id_hash_2()  argument
136 return &pn->l2tp_session_hlist[hash_32(session_id, L2TP_HASH_BITS_2)]; in l2tp_session_id_hash_2()
207 const struct l2tp_net *pn = l2tp_pernet(net); in l2tp_tunnel_get() local
211 list_for_each_entry_rcu(tunnel, &pn->l2tp_tunnel_list, list) { in l2tp_tunnel_get()
227 const struct l2tp_net *pn = l2tp_pernet(net); in l2tp_tunnel_get_nth() local
232 list_for_each_entry_rcu(tunnel, &pn->l2tp_tunnel_list, list) { in l2tp_tunnel_get_nth()
317 struct l2tp_net *pn = l2tp_pernet(net); in l2tp_session_get_by_ifname() local
323 hlist_for_each_entry_rcu(session, &pn->l2tp_session_hlist[hash], global_hlist) { in l2tp_session_get_by_ifname()
345 struct l2tp_net *pn; in l2tp_session_register() local
363 pn = l2tp_pernet(tunnel->l2tp_net); in l2tp_session_register()
364 g_head = l2tp_session_id_hash_2(pn, session->session_id); in l2tp_session_register()
366 spin_lock_bh(&pn->l2tp_session_hlist_lock); in l2tp_session_register()
382 spin_unlock_bh(&pn->l2tp_session_hlist_lock); in l2tp_session_register()
395 spin_unlock_bh(&pn->l2tp_session_hlist_lock); in l2tp_session_register()
1179 struct l2tp_net *pn = l2tp_pernet(tunnel->l2tp_net); in l2tp_session_unhash() local
1181 spin_lock_bh(&pn->l2tp_session_hlist_lock); in l2tp_session_unhash()
1183 spin_unlock_bh(&pn->l2tp_session_hlist_lock); in l2tp_session_unhash()
1237 struct l2tp_net *pn; in l2tp_tunnel_del_work() local
1252 pn = l2tp_pernet(tunnel->l2tp_net); in l2tp_tunnel_del_work()
1253 spin_lock_bh(&pn->l2tp_tunnel_list_lock); in l2tp_tunnel_del_work()
1255 spin_unlock_bh(&pn->l2tp_tunnel_list_lock); in l2tp_tunnel_del_work()
1459 struct l2tp_net *pn; in l2tp_tunnel_register() local
1481 pn = l2tp_pernet(net); in l2tp_tunnel_register()
1487 spin_lock_bh(&pn->l2tp_tunnel_list_lock); in l2tp_tunnel_register()
1488 list_for_each_entry(tunnel_walk, &pn->l2tp_tunnel_list, list) { in l2tp_tunnel_register()
1490 spin_unlock_bh(&pn->l2tp_tunnel_list_lock); in l2tp_tunnel_register()
1496 list_add_rcu(&tunnel->list, &pn->l2tp_tunnel_list); in l2tp_tunnel_register()
1497 spin_unlock_bh(&pn->l2tp_tunnel_list_lock); in l2tp_tunnel_register()
1641 struct l2tp_net *pn = net_generic(net, l2tp_net_id); in l2tp_init_net() local
1644 INIT_LIST_HEAD(&pn->l2tp_tunnel_list); in l2tp_init_net()
1645 spin_lock_init(&pn->l2tp_tunnel_list_lock); in l2tp_init_net()
1648 INIT_HLIST_HEAD(&pn->l2tp_session_hlist[hash]); in l2tp_init_net()
1650 spin_lock_init(&pn->l2tp_session_hlist_lock); in l2tp_init_net()
1657 struct l2tp_net *pn = l2tp_pernet(net); in l2tp_exit_net() local
1662 list_for_each_entry_rcu(tunnel, &pn->l2tp_tunnel_list, list) { in l2tp_exit_net()
1672 WARN_ON_ONCE(!hlist_empty(&pn->l2tp_session_hlist[hash])); in l2tp_exit_net()