drivers/infiniband/hw/efa/efa.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/efa/efa.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/hw/efa/efa.h- Extension
.h- Size
- 5357 bytes
- Lines
- 198
- 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.
- 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/bitops.hlinux/interrupt.hlinux/pci.hrdma/efa-abi.hrdma/ib_verbs.hefa_com_cmd.h
Detected Declarations
struct efa_irqstruct efa_statsstruct efa_devstruct efa_ucontextstruct efa_pdstruct efa_mr_interconnect_infostruct efa_mrstruct efa_cqstruct efa_qpstruct efa_ahstruct efa_eq
Annotated Snippet
struct efa_irq {
irq_handler_t handler;
void *data;
u32 irqn;
u32 vector;
cpumask_t affinity_hint_mask;
char name[EFA_IRQNAME_SIZE];
};
/* Don't use anything other than atomic64 */
struct efa_stats {
atomic64_t alloc_pd_err;
atomic64_t create_qp_err;
atomic64_t create_cq_err;
atomic64_t reg_mr_err;
atomic64_t alloc_ucontext_err;
atomic64_t create_ah_err;
atomic64_t mmap_err;
atomic64_t keep_alive_rcvd;
};
struct efa_dev {
struct ib_device ibdev;
struct efa_com_dev edev;
struct pci_dev *pdev;
struct efa_com_get_device_attr_result dev_attr;
u64 reg_bar_addr;
u64 reg_bar_len;
u64 mem_bar_addr;
u64 mem_bar_len;
u64 db_bar_addr;
u64 db_bar_len;
u32 num_irq_vectors;
u32 admin_msix_vector_idx;
struct efa_irq admin_irq;
struct efa_stats stats;
/* Array of completion EQs */
struct efa_eq *eqs;
u32 neqs;
/* Only stores CQs with interrupts enabled */
struct xarray cqs_xa;
};
struct efa_ucontext {
struct ib_ucontext ibucontext;
u16 uarn;
};
struct efa_pd {
struct ib_pd ibpd;
u16 pdn;
};
struct efa_mr_interconnect_info {
u16 recv_ic_id;
u16 rdma_read_ic_id;
u16 rdma_recv_ic_id;
u8 recv_ic_id_valid : 1;
u8 rdma_read_ic_id_valid : 1;
u8 rdma_recv_ic_id_valid : 1;
};
struct efa_mr {
struct ib_mr ibmr;
struct ib_umem *umem;
struct efa_mr_interconnect_info ic_info;
};
struct efa_cq {
struct ib_cq ibcq;
struct efa_ucontext *ucontext;
dma_addr_t dma_addr;
void *cpu_addr;
struct rdma_user_mmap_entry *mmap_entry;
struct rdma_user_mmap_entry *db_mmap_entry;
size_t size;
u16 cq_idx;
/* NULL when no interrupts requested */
struct efa_eq *eq;
struct ib_umem *umem;
};
struct efa_qp {
struct ib_qp ibqp;
dma_addr_t rq_dma_addr;
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/interrupt.h`, `linux/pci.h`, `rdma/efa-abi.h`, `rdma/ib_verbs.h`, `efa_com_cmd.h`.
- Detected declarations: `struct efa_irq`, `struct efa_stats`, `struct efa_dev`, `struct efa_ucontext`, `struct efa_pd`, `struct efa_mr_interconnect_info`, `struct efa_mr`, `struct efa_cq`, `struct efa_qp`, `struct efa_ah`.
- Atlas domain: Driver Families / drivers/infiniband.
- Implementation status: source implementation candidate.
- 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.