Lines Matching refs:ctl
73 free_nl_ctl(struct nl_control *ctl) in free_nl_ctl() argument
75 rm_destroy(&ctl->ctl_lock); in free_nl_ctl()
76 free(ctl, M_NETLINK); in free_nl_ctl()
82 struct nl_control *ctl; in vnet_nl_ctl_init() local
84 ctl = malloc(sizeof(struct nl_control), M_NETLINK, M_WAITOK | M_ZERO); in vnet_nl_ctl_init()
85 rm_init(&ctl->ctl_lock, "netlink lock"); in vnet_nl_ctl_init()
86 CK_LIST_INIT(&ctl->ctl_port_head); in vnet_nl_ctl_init()
87 CK_LIST_INIT(&ctl->ctl_pcb_head); in vnet_nl_ctl_init()
94 atomic_store_ptr(&V_nl_ctl, ctl); in vnet_nl_ctl_init()
95 CK_LIST_INSERT_HEAD(&vnets_head, ctl, ctl_next); in vnet_nl_ctl_init()
97 curvnet, ctl); in vnet_nl_ctl_init()
100 free_nl_ctl(ctl); in vnet_nl_ctl_init()
101 ctl = tmp; in vnet_nl_ctl_init()
106 return (ctl); in vnet_nl_ctl_init()
112 struct nl_control *ctl; in vnet_nl_ctl_destroy() local
117 ctl = atomic_load_ptr(&V_nl_ctl); in vnet_nl_ctl_destroy()
119 if (ctl != NULL) { in vnet_nl_ctl_destroy()
120 NL_LOG(LOG_DEBUG2, "Removing %p from global list", ctl); in vnet_nl_ctl_destroy()
121 CK_LIST_REMOVE(ctl, ctl_next); in vnet_nl_ctl_destroy()
125 if (ctl != NULL) in vnet_nl_ctl_destroy()
126 free_nl_ctl(ctl); in vnet_nl_ctl_destroy()
196 struct nl_control *ctl; in can_unload() local
201 CK_LIST_FOREACH(ctl, &vnets_head, ctl_next) { in can_unload()
202 NL_LOG(LOG_DEBUG2, "Iterating VNET head %p", ctl); in can_unload()
203 if (!CK_LIST_EMPTY(&ctl->ctl_pcb_head)) { in can_unload()
204 NL_LOG(LOG_NOTICE, "non-empty socket list in ctl %p", ctl); in can_unload()