ib_umem_get_cq_buf_or_va(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay bestie, welcome to the Kernel API Manual page for ib_umem_get_cq_buf_or_va(9) ✨ She is literally here to pin a CQ buffer umem with UHW VA fallback. No cap.

πŸŽ€ SYNOPSIS πŸŽ€

the signature, untouched, because we respect the code:

       struct ib_umem * ib_umem_get_cq_buf_or_va (struct ib_device *device ,
       const struct uverbs_attr_bundle *attrs , u64 addr , size_t size , int
       access );

🌸 ARGUMENTS 🌸

  • device β€” the IB device, bestie.
  • attrs β€” the uverbs attribute bundle. it may be NULL, and that's valid.
  • addr β€” the UHW user VA used when no per-command attribute matched.
  • size β€” okay so on the attr / legacy paths, this is the minimum required umem length validated post-pin; on the VA fallback path, it's the length to pin. yes, she does double duty, keep reading.
  • access β€” the IB access flags.

πŸ¦‹ DESCRIPTION πŸ¦‹

So it's like ib_umem_get_cq_buf, but it pins addr/size when neither the UMEM attribute nor the legacy CQ buffer attributes are supplied. That's the whole glow-up ✨

Also: see ib_umem_get_attr_or_va for the note on size's dual role and the migration path for drivers that would distinguish a user-supplied length from a driver-computed minimum. iykyk.

πŸ”₯ RETURN πŸ”₯

On success you get a caller-owned umem 🫢 On error it's ERR_PTR(...), so handle it with care 😭

🌈 SEE ALSO 🌈


mwah πŸ’‹ this page comes from the ./drivers/infiniband/core source, October 2026 edition β€” slay, go read the kernel code responsibly πŸ‘‘

πŸ“¦ where this page comes from