drivers/infiniband/hw/erdma/erdma_hw.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/erdma/erdma_hw.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/hw/erdma/erdma_hw.h- Extension
.h- Size
- 17666 bytes
- Lines
- 754
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/types.hlinux/if_ether.h
Detected Declarations
struct erdma_cmdq_destroy_cq_reqstruct erdma_cmdq_create_eq_reqstruct erdma_cmdq_destroy_eq_reqstruct erdma_cmdq_config_device_reqstruct erdma_cmdq_config_mtu_reqstruct erdma_cmdq_ext_db_reqstruct erdma_cmdq_create_cq_reqstruct erdma_cmdq_reg_mr_reqstruct erdma_cmdq_dereg_mr_reqstruct erdma_av_cfgstruct erdma_cmdq_create_ah_reqstruct erdma_cmdq_destroy_ah_reqstruct erdma_cmdq_modify_qp_reqstruct erdma_cmdq_mod_qp_req_rocev2struct erdma_cmdq_query_qp_req_rocev2struct erdma_cmdq_create_qp_reqstruct erdma_cmdq_destroy_qp_reqstruct erdma_cmdq_reflush_reqstruct erdma_cmdq_query_reqstruct erdma_cmdq_query_resp_hdrstruct erdma_cmdq_query_stats_respstruct erdma_cmdq_set_gid_reqstruct erdma_cqestruct erdma_sgestruct erdma_rqestruct erdma_write_sqestruct erdma_send_sqe_rcstruct erdma_send_sqe_udstruct erdma_readreq_sqestruct erdma_atomic_sqestruct erdma_reg_mr_sqestruct erdma_aeqeenum erdma_proto_typeenum CMDQ_WQE_SUB_MODenum CMDQ_RDMA_OPCODEenum CMDQ_COMMON_OPCODEenum erdma_qp_typeenum erdma_network_typeenum erdma_set_gid_openum erdma_opcodeenum erdma_wc_statusenum erdma_vendor_err
Annotated Snippet
struct erdma_cmdq_destroy_cq_req {
u64 hdr;
u32 cqn;
};
#define ERDMA_EQ_TYPE_AEQ 0
#define ERDMA_EQ_TYPE_CEQ 1
struct erdma_cmdq_create_eq_req {
u64 hdr;
u64 qbuf_addr;
u8 vector_idx;
u8 eqn;
u8 depth;
u8 qtype;
u32 db_dma_addr_l;
u32 db_dma_addr_h;
};
struct erdma_cmdq_destroy_eq_req {
u64 hdr;
u64 rsvd0;
u8 vector_idx;
u8 eqn;
u8 rsvd1;
u8 qtype;
};
/* config device cfg */
#define ERDMA_CMD_CONFIG_DEVICE_PS_EN_MASK BIT(31)
#define ERDMA_CMD_CONFIG_DEVICE_PGSHIFT_MASK GENMASK(4, 0)
struct erdma_cmdq_config_device_req {
u64 hdr;
u32 cfg;
u32 rsvd[5];
};
struct erdma_cmdq_config_mtu_req {
u64 hdr;
u32 mtu;
};
/* ext db requests(alloc and free) cfg */
#define ERDMA_CMD_EXT_DB_CQ_EN_MASK BIT(2)
#define ERDMA_CMD_EXT_DB_RQ_EN_MASK BIT(1)
#define ERDMA_CMD_EXT_DB_SQ_EN_MASK BIT(0)
struct erdma_cmdq_ext_db_req {
u64 hdr;
u32 cfg;
u16 rdb_off;
u16 sdb_off;
u16 rsvd0;
u16 cdb_off;
u32 rsvd1[3];
};
/* alloc db response qword 0 definition */
#define ERDMA_CMD_ALLOC_DB_RESP_RDB_MASK GENMASK_ULL(63, 48)
#define ERDMA_CMD_ALLOC_DB_RESP_CDB_MASK GENMASK_ULL(47, 32)
#define ERDMA_CMD_ALLOC_DB_RESP_SDB_MASK GENMASK_ULL(15, 0)
/* create_cq cfg0 */
#define ERDMA_CMD_CREATE_CQ_DEPTH_MASK GENMASK(31, 24)
#define ERDMA_CMD_CREATE_CQ_PAGESIZE_MASK GENMASK(23, 20)
#define ERDMA_CMD_CREATE_CQ_CQN_MASK GENMASK(19, 0)
/* create_cq cfg1 */
#define ERDMA_CMD_CREATE_CQ_MTT_CNT_MASK GENMASK(31, 16)
#define ERDMA_CMD_CREATE_CQ_MTT_LEVEL_MASK BIT(15)
#define ERDMA_CMD_CREATE_CQ_MTT_DB_CFG_MASK BIT(11)
#define ERDMA_CMD_CREATE_CQ_EQN_MASK GENMASK(9, 0)
/* create_cq cfg2 */
#define ERDMA_CMD_CREATE_CQ_DB_CFG_MASK GENMASK(15, 0)
struct erdma_cmdq_create_cq_req {
u64 hdr;
u32 cfg0;
u32 qbuf_addr_l;
u32 qbuf_addr_h;
u32 cfg1;
u64 cq_dbrec_dma;
u32 first_page_offset;
u32 cfg2;
};
/* regmr/deregmr cfg0 */
#define ERDMA_CMD_MR_VALID_MASK BIT(31)
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/types.h`, `linux/if_ether.h`.
- Detected declarations: `struct erdma_cmdq_destroy_cq_req`, `struct erdma_cmdq_create_eq_req`, `struct erdma_cmdq_destroy_eq_req`, `struct erdma_cmdq_config_device_req`, `struct erdma_cmdq_config_mtu_req`, `struct erdma_cmdq_ext_db_req`, `struct erdma_cmdq_create_cq_req`, `struct erdma_cmdq_reg_mr_req`, `struct erdma_cmdq_dereg_mr_req`, `struct erdma_av_cfg`.
- Atlas domain: Driver Families / drivers/infiniband.
- Implementation status: source implementation candidate.
- 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.