include/linux/mlx5/qp.h
Source file repositories/reference/linux-study-clean/include/linux/mlx5/qp.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mlx5/qp.h- Extension
.h- Size
- 13057 bytes
- Lines
- 590
- 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/mlx5/device.hlinux/mlx5/driver.h
Detected Declarations
struct mlx5_wqe_fmr_segstruct mlx5_wqe_ctrl_segstruct mlx5_wqe_eth_segstruct mlx5_wqe_xrc_segstruct mlx5_wqe_masked_atomic_segstruct mlx5_base_avstruct mlx5_avstruct mlx5_ib_ahstruct mlx5_wqe_datagram_segstruct mlx5_wqe_raddr_segstruct mlx5_wqe_atomic_segstruct mlx5_wqe_data_segstruct mlx5_wqe_umr_ctrl_segstruct mlx5_seg_set_psvstruct mlx5_seg_get_psvstruct mlx5_seg_check_psvstruct mlx5_rwqe_sigstruct mlx5_wqe_signature_segstruct mlx5_wqe_inline_segstruct mlx5_bsf_inlstruct mlx5_bsfstruct mlx5_bsf_basicstruct mlx5_bsf_extstruct mlx5_mttstruct mlx5_klmstruct mlx5_ksmstruct mlx5_stride_block_entrystruct mlx5_stride_block_ctrl_segstruct mlx5_wqe_flow_update_ctrl_segstruct mlx5_wqe_header_modify_argument_update_segstruct mlx5_core_qpstruct mlx5_core_dctenum mlx5_qp_optparenum mlx5_qp_stateenum mlx5_sig_typefunction mlx5_get_qp_default_ts
Annotated Snippet
struct mlx5_wqe_fmr_seg {
__be32 flags;
__be32 mem_key;
__be64 buf_list;
__be64 start_addr;
__be64 reg_len;
__be32 offset;
__be32 page_size;
u32 reserved[2];
};
struct mlx5_wqe_ctrl_seg {
__be32 opmod_idx_opcode;
__be32 qpn_ds;
struct_group(trailer,
u8 signature;
u8 rsvd[2];
u8 fm_ce_se;
union {
__be32 general_id;
__be32 imm;
__be32 umr_mkey;
__be32 tis_tir_num;
};
); /* end of trailer group */
};
#define MLX5_WQE_CTRL_DS_MASK 0x3f
#define MLX5_WQE_CTRL_QPN_MASK 0xffffff00
#define MLX5_WQE_CTRL_QPN_SHIFT 8
#define MLX5_WQE_DS_UNITS 16
#define MLX5_WQE_CTRL_OPCODE_MASK 0xff
#define MLX5_WQE_CTRL_WQE_INDEX_MASK 0x00ffff00
#define MLX5_WQE_CTRL_WQE_INDEX_SHIFT 8
enum {
MLX5_ETH_WQE_L3_INNER_CSUM = 1 << 4,
MLX5_ETH_WQE_L4_INNER_CSUM = 1 << 5,
MLX5_ETH_WQE_L3_CSUM = 1 << 6,
MLX5_ETH_WQE_L4_CSUM = 1 << 7,
};
enum {
MLX5_ETH_WQE_TRAILER_HDR_OUTER_IP_ASSOC = 1 << 26,
MLX5_ETH_WQE_TRAILER_HDR_OUTER_L4_ASSOC = 1 << 27,
MLX5_ETH_WQE_TRAILER_HDR_INNER_IP_ASSOC = 3 << 26,
MLX5_ETH_WQE_TRAILER_HDR_INNER_L4_ASSOC = 1 << 28,
MLX5_ETH_WQE_INSERT_TRAILER = 1 << 30,
};
enum {
MLX5_ETH_WQE_SWP_INNER_L3_IPV6 = 1 << 0,
MLX5_ETH_WQE_SWP_INNER_L4_UDP = 1 << 1,
MLX5_ETH_WQE_SWP_OUTER_L3_IPV6 = 1 << 4,
MLX5_ETH_WQE_SWP_OUTER_L4_UDP = 1 << 5,
};
/* Metadata bits 0-7 are used by timestamping */
/* Base shift for metadata bits used by IPsec and MACsec */
#define MLX5_ETH_WQE_FT_META_SHIFT 8
enum {
MLX5_ETH_WQE_FT_META_IPSEC = BIT(0) << MLX5_ETH_WQE_FT_META_SHIFT,
MLX5_ETH_WQE_FT_META_MACSEC = BIT(1) << MLX5_ETH_WQE_FT_META_SHIFT,
MLX5_ETH_WQE_FT_META_MACSEC_FS_ID_MASK =
GENMASK(5, 2) << MLX5_ETH_WQE_FT_META_SHIFT,
};
struct mlx5_wqe_eth_seg {
u8 swp_outer_l4_offset;
u8 swp_outer_l3_offset;
u8 swp_inner_l4_offset;
u8 swp_inner_l3_offset;
u8 cs_flags;
u8 swp_flags;
__be16 mss;
__be32 flow_table_metadata;
union {
struct {
__be16 sz;
union {
u8 start[2];
DECLARE_FLEX_ARRAY(u8, data);
};
} inline_hdr;
__be32 trailer;
};
Annotation
- Immediate include surface: `linux/mlx5/device.h`, `linux/mlx5/driver.h`.
- Detected declarations: `struct mlx5_wqe_fmr_seg`, `struct mlx5_wqe_ctrl_seg`, `struct mlx5_wqe_eth_seg`, `struct mlx5_wqe_xrc_seg`, `struct mlx5_wqe_masked_atomic_seg`, `struct mlx5_base_av`, `struct mlx5_av`, `struct mlx5_ib_ah`, `struct mlx5_wqe_datagram_seg`, `struct mlx5_wqe_raddr_seg`.
- 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.