virtqueue_add_outbuf(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… virtqueue_add_outbuf(9) β€” kernel API manual, bestie edition ✨

🌸 NAME 🌸

virtqueue_add_outbuf β€” expose output buffers to other end, and honestly? iconic.

✨ SYNOPSIS ✨

int virtqueue_add_outbuf (struct virtqueue *vq , struct scatterlist *sg
, unsigned int num , void *data , gfp_t gfp );

πŸŽ€ ARGUMENTS πŸŽ€

  • vq β€” the struct virtqueue we're talking about, periodt.
  • sg β€” scatterlist (must be well-formed and terminated!), no cap.
  • num β€” the number of entries in sg readable by other side.
  • data β€” the token identifying the buffer.
  • gfp β€” how to do memory allocations (if necessary).

πŸ’– DESCRIPTION πŸ’–

okay so bestie, here's the tea: the caller must ensure we don't call this with other virtqueue operations at the same time (except where noted, iykyk). That's the vibe check.

⚠️ no cap, this is important: don't run this concurrently with other virtqueue ops unless the docs say it's fine.

It returns zero or a negative error (ie. ENOSPC, ENOMEM, EIO). So if you get a negative number, it's giving "no space", "no memory", or "I/O error" energy. πŸ’€


πŸ¦‹ SEE ALSO πŸ¦‹

bestie, peep the kernel file ./drivers/virtio/virtio_ring.c and then these iconic functions:


signing off from ./drivers/virtio β€” October 2026, virtqueue_add_outbuf(9) out! πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from