include/rdma/ib_verbs.h
Source file repositories/reference/linux-study-clean/include/rdma/ib_verbs.h
File Facts
- System
- Linux kernel
- Corpus path
include/rdma/ib_verbs.h- Extension
.h- Size
- 155565 bytes
- Lines
- 5158
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source 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.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/ethtool.hlinux/types.hlinux/device.hlinux/bvec.hlinux/dma-mapping.hlinux/kref.hlinux/list.hlinux/rwsem.hlinux/workqueue.hlinux/irq_poll.huapi/linux/if_ether.hnet/ipv6.hnet/ip.hlinux/string.hlinux/slab.hlinux/netdevice.hlinux/refcount.hlinux/if_link.hlinux/atomic.hlinux/mmu_notifier.hlinux/uaccess.hlinux/cgroup_rdma.hlinux/irqflags.hlinux/preempt.hlinux/dim.huapi/rdma/ib_user_verbs.hrdma/rdma_counter.hrdma/restrack.hrdma/signature.huapi/rdma/rdma_user_ioctl.huapi/rdma/ib_user_ioctl_verbs.hlinux/pci-tph.h
Detected Declarations
struct ib_umem_odpstruct ib_uqp_objectstruct ib_usrq_objectstruct ib_uwq_objectstruct rdma_cm_idstruct ib_portstruct hw_stats_device_datastruct ib_ucq_objectstruct ib_gid_attrstruct ib_odp_capsstruct ib_rss_capsstruct ib_tm_capsstruct ib_cq_init_attrstruct ib_cq_capsstruct ib_dm_mr_attrstruct ib_dm_alloc_attrstruct ib_device_attrstruct rdma_stat_descstruct rdma_hw_statsstruct ib_port_attrstruct ib_device_modifystruct ib_port_modifystruct ib_eventstruct ib_event_handlerstruct ib_global_routestruct ib_grhstruct ib_port_speed_infostruct ib_mr_statusstruct rdma_ah_init_attrstruct ib_ah_attrstruct roce_ah_attrstruct opa_ah_attrstruct rdma_ah_attrstruct ib_wcstruct ib_srq_attrstruct ib_srq_init_attrstruct ib_qp_capstruct ib_qp_init_attrstruct ib_qp_open_attrstruct ib_qp_attrstruct ib_sgestruct ib_cqestruct ib_send_wrstruct ib_rdma_wrstruct ib_atomic_wrstruct ib_ud_wrstruct ib_reg_wrstruct ib_recv_wr
Annotated Snippet
struct ib_gid_attr {
struct net_device __rcu *ndev;
struct ib_device *device;
union ib_gid gid;
enum ib_gid_type gid_type;
u16 index;
u32 port_num;
};
enum {
/* set the local administered indication */
IB_SA_WELL_KNOWN_GUID = BIT_ULL(57) | 2,
};
enum rdma_transport_type {
RDMA_TRANSPORT_IB,
RDMA_TRANSPORT_IWARP,
RDMA_TRANSPORT_USNIC,
RDMA_TRANSPORT_USNIC_UDP,
RDMA_TRANSPORT_UNSPECIFIED,
};
enum rdma_protocol_type {
RDMA_PROTOCOL_IB,
RDMA_PROTOCOL_IBOE,
RDMA_PROTOCOL_IWARP,
RDMA_PROTOCOL_USNIC_UDP
};
__attribute_const__ enum rdma_transport_type
rdma_node_get_transport(unsigned int node_type);
enum rdma_network_type {
RDMA_NETWORK_IB,
RDMA_NETWORK_ROCE_V1,
RDMA_NETWORK_IPV4,
RDMA_NETWORK_IPV6
};
static inline enum ib_gid_type ib_network_to_gid_type(enum rdma_network_type network_type)
{
if (network_type == RDMA_NETWORK_IPV4 ||
network_type == RDMA_NETWORK_IPV6)
return IB_GID_TYPE_ROCE_UDP_ENCAP;
else if (network_type == RDMA_NETWORK_ROCE_V1)
return IB_GID_TYPE_ROCE;
else
return IB_GID_TYPE_IB;
}
static inline enum rdma_network_type
rdma_gid_attr_network_type(const struct ib_gid_attr *attr)
{
if (attr->gid_type == IB_GID_TYPE_IB)
return RDMA_NETWORK_IB;
if (attr->gid_type == IB_GID_TYPE_ROCE)
return RDMA_NETWORK_ROCE_V1;
if (ipv6_addr_v4mapped((struct in6_addr *)&attr->gid))
return RDMA_NETWORK_IPV4;
else
return RDMA_NETWORK_IPV6;
}
enum rdma_link_layer {
IB_LINK_LAYER_UNSPECIFIED,
IB_LINK_LAYER_INFINIBAND,
IB_LINK_LAYER_ETHERNET,
};
enum ib_device_cap_flags {
IB_DEVICE_RESIZE_MAX_WR = IB_UVERBS_DEVICE_RESIZE_MAX_WR,
IB_DEVICE_BAD_PKEY_CNTR = IB_UVERBS_DEVICE_BAD_PKEY_CNTR,
IB_DEVICE_BAD_QKEY_CNTR = IB_UVERBS_DEVICE_BAD_QKEY_CNTR,
IB_DEVICE_RAW_MULTI = IB_UVERBS_DEVICE_RAW_MULTI,
IB_DEVICE_AUTO_PATH_MIG = IB_UVERBS_DEVICE_AUTO_PATH_MIG,
IB_DEVICE_CHANGE_PHY_PORT = IB_UVERBS_DEVICE_CHANGE_PHY_PORT,
IB_DEVICE_UD_AV_PORT_ENFORCE = IB_UVERBS_DEVICE_UD_AV_PORT_ENFORCE,
IB_DEVICE_CURR_QP_STATE_MOD = IB_UVERBS_DEVICE_CURR_QP_STATE_MOD,
IB_DEVICE_SHUTDOWN_PORT = IB_UVERBS_DEVICE_SHUTDOWN_PORT,
/* IB_DEVICE_INIT_TYPE = IB_UVERBS_DEVICE_INIT_TYPE, (not in use) */
IB_DEVICE_PORT_ACTIVE_EVENT = IB_UVERBS_DEVICE_PORT_ACTIVE_EVENT,
IB_DEVICE_SYS_IMAGE_GUID = IB_UVERBS_DEVICE_SYS_IMAGE_GUID,
IB_DEVICE_RC_RNR_NAK_GEN = IB_UVERBS_DEVICE_RC_RNR_NAK_GEN,
IB_DEVICE_SRQ_RESIZE = IB_UVERBS_DEVICE_SRQ_RESIZE,
IB_DEVICE_N_NOTIFY_CQ = IB_UVERBS_DEVICE_N_NOTIFY_CQ,
/* Reserved, old SEND_W_INV = 1 << 16,*/
IB_DEVICE_MEM_WINDOW = IB_UVERBS_DEVICE_MEM_WINDOW,
Annotation
- Immediate include surface: `linux/ethtool.h`, `linux/types.h`, `linux/device.h`, `linux/bvec.h`, `linux/dma-mapping.h`, `linux/kref.h`, `linux/list.h`, `linux/rwsem.h`.
- Detected declarations: `struct ib_umem_odp`, `struct ib_uqp_object`, `struct ib_usrq_object`, `struct ib_uwq_object`, `struct rdma_cm_id`, `struct ib_port`, `struct hw_stats_device_data`, `struct ib_ucq_object`, `struct ib_gid_attr`, `struct ib_odp_caps`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- 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.