MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / create_queue

Method create_queue

vm-virtio/src/queue.rs:230–240  ·  view source on GitHub ↗

Creates a new Queue, using the underlying memory regions represented by the VirtQueue.

(&self)

Source from the content-addressed store, hash-verified

228
229 // Creates a new Queue, using the underlying memory regions represented by the VirtQueue.
230 pub fn create_queue(&self) -> Queue {
231 let mut q = Queue::new(self.size()).unwrap();
232
233 q.set_size(self.size());
234 q.set_ready(true);
235 q.try_set_desc_table_address(self.dtable_start()).unwrap();
236 q.try_set_avail_ring_address(self.avail_start()).unwrap();
237 q.try_set_used_ring_address(self.used_start()).unwrap();
238
239 q
240 }
241
242 pub fn start(&self) -> GuestAddress {
243 self.dtable_start()

Calls 6

newFunction · 0.85
set_sizeMethod · 0.80
dtable_startMethod · 0.80
avail_startMethod · 0.80
used_startMethod · 0.80
sizeMethod · 0.45

Tested by 1