include/rdma/ib_mad.h
Source file repositories/reference/linux-study-clean/include/rdma/ib_mad.h
File Facts
- System
- Linux kernel
- Corpus path
include/rdma/ib_mad.h- Extension
.h- Size
- 25207 bytes
- Lines
- 823
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/list.hrdma/ib_verbs.huapi/rdma/ib_user_mad.h
Detected Declarations
struct ib_mad_hdrstruct ib_rmpp_hdrstruct ib_sa_hdrstruct ib_madstruct opa_madstruct ib_rmpp_madstruct opa_rmpp_madstruct ib_sa_madstruct ib_vendor_madstruct ib_class_port_infostruct opa_class_port_infostruct ib_mad_notice_attrstruct ib_mad_send_bufstruct ib_mad_agentstruct ib_mad_send_wcstruct ib_mad_recv_wcstruct ib_mad_agentstruct ib_mad_send_wcstruct ib_mad_recv_bufstruct ib_mad_recv_wcstruct ib_mad_reg_reqenum ib_port_capability_mask_bitsenum ib_port_capability_mask2_bitsfunction ib_get_cpi_resp_timefunction ib_set_cpi_resp_timefunction ib_get_cpi_capmask2function ib_set_cpi_capmask2function opa_get_cpi_capmask2function ib_get_rmpp_resptimefunction ib_get_rmpp_flagsfunction ib_set_rmpp_resptimefunction ib_set_rmpp_flagsfunction ib_cancel_mad
Annotated Snippet
struct ib_mad_hdr {
u8 base_version;
u8 mgmt_class;
u8 class_version;
u8 method;
__be16 status;
__be16 class_specific;
__be64 tid;
__be16 attr_id;
__be16 resv;
__be32 attr_mod;
};
struct ib_rmpp_hdr {
u8 rmpp_version;
u8 rmpp_type;
u8 rmpp_rtime_flags;
u8 rmpp_status;
__be32 seg_num;
__be32 paylen_newwin;
};
typedef u64 __bitwise ib_sa_comp_mask;
#define IB_SA_COMP_MASK(n) ((__force ib_sa_comp_mask) cpu_to_be64(1ull << (n)))
/*
* ib_sa_hdr and ib_sa_mad structures must be packed because they have
* 64-bit fields that are only 32-bit aligned. 64-bit architectures will
* lay them out wrong otherwise. (And unfortunately they are sent on
* the wire so we can't change the layout)
*/
struct ib_sa_hdr {
__be64 sm_key;
__be16 attr_offset;
__be16 reserved;
ib_sa_comp_mask comp_mask;
} __packed;
struct ib_mad {
struct ib_mad_hdr mad_hdr;
u8 data[IB_MGMT_MAD_DATA];
};
struct opa_mad {
struct ib_mad_hdr mad_hdr;
u8 data[OPA_MGMT_MAD_DATA];
};
struct ib_rmpp_mad {
struct ib_mad_hdr mad_hdr;
struct ib_rmpp_hdr rmpp_hdr;
u8 data[IB_MGMT_RMPP_DATA];
};
struct opa_rmpp_mad {
struct ib_mad_hdr mad_hdr;
struct ib_rmpp_hdr rmpp_hdr;
u8 data[OPA_MGMT_RMPP_DATA];
};
struct ib_sa_mad {
struct ib_mad_hdr mad_hdr;
struct ib_rmpp_hdr rmpp_hdr;
struct ib_sa_hdr sa_hdr;
u8 data[IB_MGMT_SA_DATA];
} __packed;
struct ib_vendor_mad {
struct ib_mad_hdr mad_hdr;
struct ib_rmpp_hdr rmpp_hdr;
u8 reserved;
u8 oui[3];
u8 data[IB_MGMT_VENDOR_DATA];
};
#define IB_MGMT_CLASSPORTINFO_ATTR_ID cpu_to_be16(0x0001)
#define IB_CLASS_PORT_INFO_RESP_TIME_MASK 0x1F
#define IB_CLASS_PORT_INFO_RESP_TIME_FIELD_SIZE 5
struct ib_class_port_info {
u8 base_version;
u8 class_version;
__be16 capability_mask;
/* 27 bits for cap_mask2, 5 bits for resp_time */
__be32 cap_mask2_resp_time;
u8 redirect_gid[16];
__be32 redirect_tcslfl;
__be16 redirect_lid;
Annotation
- Immediate include surface: `linux/list.h`, `rdma/ib_verbs.h`, `uapi/rdma/ib_user_mad.h`.
- Detected declarations: `struct ib_mad_hdr`, `struct ib_rmpp_hdr`, `struct ib_sa_hdr`, `struct ib_mad`, `struct opa_mad`, `struct ib_rmpp_mad`, `struct opa_rmpp_mad`, `struct ib_sa_mad`, `struct ib_vendor_mad`, `struct ib_class_port_info`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
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.