Lines Matching refs:vsock
32 struct vsock_loopback *vsock = &the_vsock_loopback; in vsock_loopback_send_pkt() local
35 spin_lock_bh(&vsock->pkt_list_lock); in vsock_loopback_send_pkt()
36 list_add_tail(&pkt->list, &vsock->pkt_list); in vsock_loopback_send_pkt()
37 spin_unlock_bh(&vsock->pkt_list_lock); in vsock_loopback_send_pkt()
39 queue_work(vsock->workqueue, &vsock->pkt_work); in vsock_loopback_send_pkt()
46 struct vsock_loopback *vsock = &the_vsock_loopback; in vsock_loopback_cancel_pkt() local
50 spin_lock_bh(&vsock->pkt_list_lock); in vsock_loopback_cancel_pkt()
51 list_for_each_entry_safe(pkt, n, &vsock->pkt_list, list) { in vsock_loopback_cancel_pkt()
56 spin_unlock_bh(&vsock->pkt_list_lock); in vsock_loopback_cancel_pkt()
122 struct vsock_loopback *vsock = in vsock_loopback_work() local
126 spin_lock_bh(&vsock->pkt_list_lock); in vsock_loopback_work()
127 list_splice_init(&vsock->pkt_list, &pkts); in vsock_loopback_work()
128 spin_unlock_bh(&vsock->pkt_list_lock); in vsock_loopback_work()
143 struct vsock_loopback *vsock = &the_vsock_loopback; in vsock_loopback_init() local
146 vsock->workqueue = alloc_workqueue("vsock-loopback", 0, 0); in vsock_loopback_init()
147 if (!vsock->workqueue) in vsock_loopback_init()
150 spin_lock_init(&vsock->pkt_list_lock); in vsock_loopback_init()
151 INIT_LIST_HEAD(&vsock->pkt_list); in vsock_loopback_init()
152 INIT_WORK(&vsock->pkt_work, vsock_loopback_work); in vsock_loopback_init()
162 destroy_workqueue(vsock->workqueue); in vsock_loopback_init()
168 struct vsock_loopback *vsock = &the_vsock_loopback; in vsock_loopback_exit() local
173 flush_work(&vsock->pkt_work); in vsock_loopback_exit()
175 spin_lock_bh(&vsock->pkt_list_lock); in vsock_loopback_exit()
176 while (!list_empty(&vsock->pkt_list)) { in vsock_loopback_exit()
177 pkt = list_first_entry(&vsock->pkt_list, in vsock_loopback_exit()
182 spin_unlock_bh(&vsock->pkt_list_lock); in vsock_loopback_exit()
184 destroy_workqueue(vsock->workqueue); in vsock_loopback_exit()