include/linux/mlx5/device.h
Source file repositories/reference/linux-study-clean/include/linux/mlx5/device.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mlx5/device.h- Extension
.h- Size
- 40483 bytes
- Lines
- 1567
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hrdma/ib_verbs.hlinux/mlx5/mlx5_ifc.hlinux/bitfield.h
Detected Declarations
struct mlx5_wqe_tls_static_params_segstruct mlx5_wqe_tls_progress_params_segstruct mlx5_odp_capsstruct mlx5_cmd_layoutstruct health_bufferstruct mlx5_init_segstruct mlx5_eqe_compstruct mlx5_eqe_qp_srqstruct mlx5_eqe_cq_errstruct mlx5_eqe_xrq_errstruct mlx5_eqe_port_statestruct mlx5_eqe_gpiostruct mlx5_eqe_congestionstruct mlx5_eqe_stall_vlstruct mlx5_eqe_cmdstruct mlx5_eqe_page_reqstruct mlx5_eqe_page_faultstruct mlx5_eqe_vport_changestruct mlx5_eqe_port_modulestruct mlx5_eqe_ppsstruct mlx5_eqe_dctstruct mlx5_eqe_temp_warningstruct mlx5_eqe_obj_changestruct mlx5_eqe_sync_fw_updatestruct mlx5_eqe_vhca_statestruct mlx5_eqestruct mlx5_cmd_prot_blockstruct mlx5_err_cqestruct mlx5_cqe64struct mlx5_mini_cqe8struct mpwrq_cqe_bcstruct mlx5_sig_err_cqestruct mlx5_wqe_srq_next_segstruct mlx5_cqe128struct mlx5_mkey_segenum mlx5_inline_modesenum wqe_page_fault_typeenum mlx5_eventenum mlx5_driver_eventenum mlx5_odp_transport_cap_bitsenum mlx5_rfr_severity_bit_offsetsenum mlx5_initializing_bit_offsetsenum mlx5_cmd_addr_l_sz_offsetenum sync_rst_state_typeenum mlx5_list_typeenum mlx5_wol_modeenum mlx5_mpls_supported_fieldsenum mlx5_flex_parser_protos
Annotated Snippet
struct mlx5_wqe_tls_static_params_seg {
u8 ctx[MLX5_ST_SZ_BYTES(tls_static_params)];
};
struct mlx5_wqe_tls_progress_params_seg {
__be32 tis_tir_num;
u8 ctx[MLX5_ST_SZ_BYTES(tls_progress_params)];
};
enum {
MLX5_SET_PORT_RESET_QKEY = 0,
MLX5_SET_PORT_GUID0 = 16,
MLX5_SET_PORT_NODE_GUID = 17,
MLX5_SET_PORT_SYS_GUID = 18,
MLX5_SET_PORT_GID_TABLE = 19,
MLX5_SET_PORT_PKEY_TABLE = 20,
};
enum {
MLX5_BW_NO_LIMIT = 0,
MLX5_100_MBPS_UNIT = 3,
MLX5_GBPS_UNIT = 4,
};
enum {
MLX5_MAX_PAGE_SHIFT = 31
};
enum {
/*
* Max wqe size for rdma read is 512 bytes, so this
* limits our max_sge_rd as the wqe needs to fit:
* - ctrl segment (16 bytes)
* - rdma segment (16 bytes)
* - scatter elements (16 bytes each)
*/
MLX5_MAX_SGE_RD = (512 - 16 - 16) / 16
};
enum mlx5_odp_transport_cap_bits {
MLX5_ODP_SUPPORT_SEND = 1 << 31,
MLX5_ODP_SUPPORT_RECV = 1 << 30,
MLX5_ODP_SUPPORT_WRITE = 1 << 29,
MLX5_ODP_SUPPORT_READ = 1 << 28,
};
struct mlx5_odp_caps {
char reserved[0x10];
struct {
__be32 rc_odp_caps;
__be32 uc_odp_caps;
__be32 ud_odp_caps;
} per_transport_caps;
char reserved2[0xe4];
};
struct mlx5_cmd_layout {
u8 type;
u8 rsvd0[3];
__be32 inlen;
__be64 in_ptr;
__be32 in[4];
__be32 out[4];
__be64 out_ptr;
__be32 outlen;
u8 token;
u8 sig;
u8 rsvd1;
u8 status_own;
};
enum mlx5_rfr_severity_bit_offsets {
MLX5_CRR_BIT_OFFSET = 0x6,
MLX5_RFR_BIT_OFFSET = 0x7,
};
struct health_buffer {
__be32 assert_var[6];
__be32 rsvd0[2];
__be32 assert_exit_ptr;
__be32 assert_callra;
__be32 rsvd1[1];
__be32 time;
__be32 fw_ver;
__be32 hw_id;
u8 rfr_severity;
u8 rsvd2[3];
u8 irisc_index;
u8 synd;
__be16 ext_synd;
Annotation
- Immediate include surface: `linux/types.h`, `rdma/ib_verbs.h`, `linux/mlx5/mlx5_ifc.h`, `linux/bitfield.h`.
- Detected declarations: `struct mlx5_wqe_tls_static_params_seg`, `struct mlx5_wqe_tls_progress_params_seg`, `struct mlx5_odp_caps`, `struct mlx5_cmd_layout`, `struct health_buffer`, `struct mlx5_init_seg`, `struct mlx5_eqe_comp`, `struct mlx5_eqe_qp_srq`, `struct mlx5_eqe_cq_err`, `struct mlx5_eqe_xrq_err`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.