virtqueue_get_vring_size(9)
β¨ virtqueue_get_vring_size(9) β¨
okay so bestie, welcome to the Kernel API Manual, section 9 obviously, and today we're doing virtqueue_get_vring_size π
it's short, it's sweet, it's iconic.
πΈ NAME πΈ
virtqueue_get_vring_size β literally just returns the size of the virtqueue's vring π
π¦ SYNOPSIS π¦
unsigned int virtqueue_get_vring_size (const struct virtqueue *_vq );
no cap, that's the whole signature. she's simple and she knows it β¨
π ARGUMENTS π
_vqβ thestruct virtqueuethat's holding the vring you care about π«Ά like, hand her the virtqueue, she'll find the vring, that's the vibe.
π₯ DESCRIPTION π₯
she returns the size of the vring. that's it. that's the function. π
and the why, iykyk: this one's mainly used for boasting to userspace π like genuinely that's what the docs say, it's for flexing. main character energy fr.
also super important: unlike basically every other operation out there, this one need not be serialized π so no locking drama, no "wait your turn" β she's chill like that. no cap.
β SEE ALSO β
kernel file ./drivers/virtio/virtio_ring.c, plus the whole friend group π:
virtqueue_add_sgs(9)virtqueue_add_outbuf(9)virtqueue_add_outbuf_premapped(9)virtqueue_add_inbuf(9)virtqueue_add_inbuf_cache_clean(9)virtqueue_add_inbuf_ctx(9)virtqueue_add_inbuf_premapped(9)virtqueue_dma_dev(9)virtqueue_kick_prepare(9)virtqueue_notify(9)virtqueue_kick(9)virtqueue_get_buf_ctx(9)virtqueue_disable_cb(9)virtqueue_enable_cb_prepare(9)virtqueue_poll(9)virtqueue_enable_cb(9)virtqueue_enable_cb_delayed(9)virtqueue_detach_unused_buf(9)vring_interrupt(9)virtqueue_resize(9)virtqueue_reset(9)virtqueue_map_alloc_coherent(9)virtqueue_map_free_coherent(9)virtqueue_map_page_attrs(9)virtqueue_unmap_page_attrs(9)virtqueue_map_single_attrs(9)virtqueue_unmap_single_attrs(9)virtqueue_map_mapping_error(9)virtqueue_map_need_sync(9)virtqueue_map_sync_single_range_for_cpu(9)virtqueue_map_sync_single_range_for_device(9)
like, the whole squad is there. go say hi π§
and that's the page, bestie π this little cutie lives in ./drivers/virtio and the doc dates from October 2026 β virtqueue_get_vring_size(9), slay, bye πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms