drivers/infiniband/hw/hfi1/mad.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/hfi1/mad.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/hw/hfi1/mad.h- Extension
.h- Size
- 12393 bytes
- Lines
- 437
- Domain
- Driver Families
- Bucket
- drivers/infiniband
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
rdma/ib_pma.hrdma/opa_smi.hrdma/opa_port_info.hopa_compat.h
Detected Declarations
struct opa_mad_notice_attrstruct ib_pma_portcounters_congstruct opa_hfi1_cong_log_event_internalstruct opa_hfi1_cong_log_eventstruct opa_hfi1_cong_logstruct opa_congestion_setting_entrystruct opa_congestion_setting_entry_shadowstruct opa_congestion_setting_attrstruct opa_congestion_setting_attr_shadowstruct ib_cc_table_entrystruct ib_cc_table_entry_shadowstruct ib_cc_table_attrstruct ib_cc_table_attr_shadowstruct cc_table_shadowstruct cc_statestruct vl_limitstruct buffer_controlstruct sc2vlntfunction get_link_speedfunction convert_xmit_counter
Annotated Snippet
struct opa_mad_notice_attr {
u8 generic_type;
u8 prod_type_msb;
__be16 prod_type_lsb;
__be16 trap_num;
__be16 toggle_count;
__be32 issuer_lid;
__be32 reserved1;
union ib_gid issuer_gid;
union {
struct {
u8 details[64];
} raw_data;
struct {
union ib_gid gid;
} __packed ntc_64_65_66_67;
struct {
__be32 lid;
} __packed ntc_128;
struct {
__be32 lid; /* where violation happened */
u8 port_num; /* where violation happened */
} __packed ntc_129_130_131;
struct {
__be32 lid; /* LID where change occurred */
__be32 new_cap_mask; /* new capability mask */
__be16 reserved2;
__be16 cap_mask3;
__be16 change_flags; /* low 4 bits only */
} __packed ntc_144;
struct {
__be64 new_sys_guid;
__be32 lid; /* lid where sys guid changed */
} __packed ntc_145;
struct {
__be32 lid;
__be32 dr_slid;
u8 method;
u8 dr_trunc_hop;
__be16 attr_id;
__be32 attr_mod;
__be64 mkey;
u8 dr_rtn_path[30];
} __packed ntc_256;
struct {
__be32 lid1;
__be32 lid2;
__be32 key;
u8 sl; /* SL: high 5 bits */
u8 reserved3[3];
union ib_gid gid1;
union ib_gid gid2;
__be32 qp1; /* high 8 bits reserved */
__be32 qp2; /* high 8 bits reserved */
} __packed ntc_257_258;
struct {
__be16 flags; /* low 8 bits reserved */
__be16 pkey;
__be32 lid1;
__be32 lid2;
u8 sl; /* SL: high 5 bits */
u8 reserved4[3];
union ib_gid gid1;
union ib_gid gid2;
__be32 qp1; /* high 8 bits reserved */
__be32 qp2; /* high 8 bits reserved */
} __packed ntc_259;
struct {
__be32 lid;
} __packed ntc_2048;
};
};
#define IB_VLARB_LOWPRI_0_31 1
#define IB_VLARB_LOWPRI_32_63 2
#define IB_VLARB_HIGHPRI_0_31 3
#define IB_VLARB_HIGHPRI_32_63 4
#define OPA_MAX_PREEMPT_CAP 32
Annotation
- Immediate include surface: `rdma/ib_pma.h`, `rdma/opa_smi.h`, `rdma/opa_port_info.h`, `opa_compat.h`.
- Detected declarations: `struct opa_mad_notice_attr`, `struct ib_pma_portcounters_cong`, `struct opa_hfi1_cong_log_event_internal`, `struct opa_hfi1_cong_log_event`, `struct opa_hfi1_cong_log`, `struct opa_congestion_setting_entry`, `struct opa_congestion_setting_entry_shadow`, `struct opa_congestion_setting_attr`, `struct opa_congestion_setting_attr_shadow`, `struct ib_cc_table_entry`.
- Atlas domain: Driver Families / drivers/infiniband.
- 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.