uverbs_get_buffer_desc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… uverbs_get_buffer_desc(9)

okay so bestie, you know how we're always like "just grab the buffer descriptor from the uverbs attr" β€” this is that function, and it's from the Kernel API Manual (kernel API girlies rise 🧚). Lowkey iconic little helper, no cap.


✨ NAME ✨

uverbs_get_buffer_desc β€” literally reads a buffer descriptor out of a uverbs attr. that's it, that's the whole vibe 🫢


🌸 SYNOPSIS 🌸

int uverbs_get_buffer_desc (const struct uverbs_attr_bundle
*attrs_bundle , u16 attr_id , struct ib_uverbs_buffer_desc *desc );

copy it exactly, babes, don't get cute with the types πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • attrs_bundle β€” the uverbs attribute bundle. yeah. that one. it's const, so hands off πŸ”₯
  • attr_id β€” the id of an UVERBS_ATTR_UMEM-typed attribute. must be that type, iykyk πŸ‘‘
  • desc β€” the descriptor you're filling in. it's giving output parameter energy, main character slot right there πŸ’…

⭐ RETURN ⭐

So here's the vibe check on return values:

  • 0 on success β€” slay, we ate πŸ“
  • -ENOENT if attr_id is not set. it's just… not there. ghosted πŸ’€
  • -EINVAL on a malformed descriptor β€” that descriptor did NOT pass the vibe check 😭
  • any other negative errno propagated from uverbs_copy_from β€” and notably -EFAULT on copy_from_user failure πŸ™ˆ
fr fr, if you see anything other than 0, go read what came back before you keep going. no cap.

πŸ¦‹ SEE ALSO πŸ¦‹

like a whole friend group of mmap entry functions, honestly obsessed 🌈


and that's the page, bestie πŸ’œ came to you from ./drivers/infiniband/core, dated October 2026, and yes it's still uverbs_get_buffer_desc(9) β€” periodt. βœ¨πŸŽ€

πŸ“¦ where this page comes from