uverbs_get_buffer_desc(9)
π 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 anUVERBS_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:
0on success β slay, we ate π-ENOENTifattr_idis not set. it's justβ¦ not there. ghosted π-EINVALon a malformed descriptor β that descriptor did NOT pass the vibe check π- any other negative errno propagated from
uverbs_copy_fromβ and notably-EFAULToncopy_from_userfailure π
fr fr, if you see anything other than 0, go read what came back before you keep going. no cap.
π¦ SEE ALSO π¦
- Kernel file
./drivers/infiniband/core/ib_core_uverbs.cβ the source, go look at it, it's right there π§ rdma_umap_priv_init(9)rdma_user_mmap_io(9)rdma_user_mmap_entry_get_pgoff(9)rdma_user_mmap_entry_get(9)rdma_user_mmap_entry_put(9)rdma_user_mmap_entry_remove(9)rdma_user_mmap_entry_insert_range(9)rdma_user_mmap_entry_insert(9)rdma_udata_to_dev(9)_uverbs_alloc(9)
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
- 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