Lines Matching full:ctl
72 free_nl_ctl(struct nl_control *ctl) in free_nl_ctl() argument
74 rm_destroy(&ctl->ctl_lock); in free_nl_ctl()
75 free(ctl, M_NETLINK); in free_nl_ctl()
81 struct nl_control *ctl; in vnet_nl_ctl_init() local
83 ctl = malloc(sizeof(struct nl_control), M_NETLINK, M_WAITOK | M_ZERO); in vnet_nl_ctl_init()
84 rm_init(&ctl->ctl_lock, "netlink lock"); in vnet_nl_ctl_init()
85 CK_LIST_INIT(&ctl->ctl_port_head); in vnet_nl_ctl_init()
86 CK_LIST_INIT(&ctl->ctl_pcb_head); in vnet_nl_ctl_init()
93 atomic_store_ptr(&V_nl_ctl, ctl); in vnet_nl_ctl_init()
94 CK_LIST_INSERT_HEAD(&vnets_head, ctl, ctl_next); in vnet_nl_ctl_init()
96 curvnet, ctl); in vnet_nl_ctl_init()
99 free_nl_ctl(ctl); in vnet_nl_ctl_init()
100 ctl = tmp; in vnet_nl_ctl_init()
105 return (ctl); in vnet_nl_ctl_init()
111 struct nl_control *ctl; in vnet_nl_ctl_destroy() local
116 ctl = atomic_load_ptr(&V_nl_ctl); in vnet_nl_ctl_destroy()
118 if (ctl != NULL) { in vnet_nl_ctl_destroy()
119 NL_LOG(LOG_DEBUG2, "Removing %p from global list", ctl); in vnet_nl_ctl_destroy()
120 CK_LIST_REMOVE(ctl, ctl_next); in vnet_nl_ctl_destroy()
124 if (ctl != NULL) in vnet_nl_ctl_destroy()
125 free_nl_ctl(ctl); in vnet_nl_ctl_destroy()
194 struct nl_control *ctl; in can_unload() local
199 CK_LIST_FOREACH(ctl, &vnets_head, ctl_next) { in can_unload()
200 NL_LOG(LOG_DEBUG2, "Iterating VNET head %p", ctl); in can_unload()
201 if (!CK_LIST_EMPTY(&ctl->ctl_pcb_head)) { in can_unload()
202 NL_LOG(LOG_NOTICE, "non-empty socket list in ctl %p", ctl); in can_unload()