include/rdma/uverbs_types.h
Source file repositories/reference/linux-study-clean/include/rdma/uverbs_types.h
File Facts
- System
- Linux kernel
- Corpus path
include/rdma/uverbs_types.h- Extension
.h- Size
- 7492 bytes
- Lines
- 225
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hrdma/ib_verbs.h
Detected Declarations
struct uverbs_obj_typestruct uverbs_api_objectstruct uverbs_obj_type_classstruct uverbs_obj_typestruct uverbs_obj_idr_typestruct uverbs_obj_fd_typestruct ib_uverbs_fileenum rdma_lookup_modefunction uverbs_uobject_get
Annotated Snippet
const struct file_operations *fops;
const char *name;
int flags;
};
struct ib_uverbs_file {
struct kref ref;
struct ib_uverbs_device *device;
struct mutex ucontext_lock;
/*
* ucontext must be accessed via ib_uverbs_get_ucontext() or with
* ucontext_lock held
*/
struct ib_ucontext *ucontext;
struct ib_uverbs_async_event_file *default_async_file;
struct list_head list;
/*
* To access the uobjects list hw_destroy_rwsem must be held for write
* OR hw_destroy_rwsem held for read AND uobjects_lock held.
* hw_destroy_rwsem should be called across any destruction of the HW
* object of an associated uobject.
*/
struct rw_semaphore hw_destroy_rwsem;
spinlock_t uobjects_lock;
struct list_head uobjects;
struct mutex umap_lock;
struct list_head umaps;
struct page *disassociate_page;
struct xarray idr;
struct mutex disassociation_lock;
};
extern const struct uverbs_obj_type_class uverbs_idr_class;
extern const struct uverbs_obj_type_class uverbs_fd_class;
int uverbs_uobject_fd_release(struct inode *inode, struct file *filp);
int uverbs_uobject_release(struct ib_uobject *uobj);
#define UVERBS_BUILD_BUG_ON(cond) (sizeof(char[1 - 2 * !!(cond)]) - \
sizeof(char))
#define UVERBS_TYPE_ALLOC_FD_RELEASE(_obj_size, _destroy_object, \
_release_cleanup, _fops, _name, _flags) \
((&((const struct uverbs_obj_fd_type) \
{.type = { \
.type_class = &uverbs_fd_class, \
.obj_size = (_obj_size) + \
UVERBS_BUILD_BUG_ON((_obj_size) < \
sizeof(struct ib_uobject)), \
}, \
.destroy_object = _destroy_object, \
.release_cleanup = _release_cleanup, \
.fops = _fops, \
.name = _name, \
.flags = _flags}))->type)
#define UVERBS_TYPE_ALLOC_FD(_obj_size, _destroy_object, _fops, _name, _flags) \
UVERBS_TYPE_ALLOC_FD_RELEASE(_obj_size, _destroy_object, NULL, \
_fops, _name, _flags)
#define UVERBS_TYPE_ALLOC_IDR_SZ(_size, _destroy_object) \
((&((const struct uverbs_obj_idr_type) \
{.type = { \
.type_class = &uverbs_idr_class, \
.obj_size = (_size) + \
UVERBS_BUILD_BUG_ON((_size) < \
sizeof(struct ib_uobject)) \
}, \
.destroy_object = _destroy_object,}))->type)
#define UVERBS_TYPE_ALLOC_IDR(_destroy_object) \
UVERBS_TYPE_ALLOC_IDR_SZ(sizeof(struct ib_uobject), \
_destroy_object)
#endif
Annotation
- Immediate include surface: `linux/kernel.h`, `rdma/ib_verbs.h`.
- Detected declarations: `struct uverbs_obj_type`, `struct uverbs_api_object`, `struct uverbs_obj_type_class`, `struct uverbs_obj_type`, `struct uverbs_obj_idr_type`, `struct uverbs_obj_fd_type`, `struct ib_uverbs_file`, `enum rdma_lookup_mode`, `function uverbs_uobject_get`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: pattern implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.