drivers/infiniband/hw/ocrdma/ocrdma.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/ocrdma/ocrdma.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/hw/ocrdma/ocrdma.h- Extension
.h- Size
- 13536 bytes
- Lines
- 606
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/mutex.hlinux/list.hlinux/spinlock.hlinux/pci.hrdma/ib_verbs.hrdma/ib_user_verbs.hrdma/ib_addr.hbe_roce.hocrdma_sli.h
Detected Declarations
struct ocrdma_dev_attrstruct ocrdma_dma_memstruct ocrdma_pblstruct ocrdma_queue_infostruct ocrdma_aic_objstruct ocrdma_eqstruct ocrdma_mqstruct mqe_ctxstruct ocrdma_hw_mrstruct ocrdma_mrstruct ocrdma_statsstruct ocrdma_pd_resource_mgrstruct stats_memstruct phy_infostruct ocrdma_devstruct ocrdma_cqstruct ocrdma_pdstruct ocrdma_ahstruct ocrdma_qp_hwq_infostruct ocrdma_srqstruct ocrdma_qpstruct ocrdma_ucontextstruct ocrdma_mmenum ocrdma_flagsfunction is_cqe_validfunction is_cqe_for_sqfunction is_cqe_invalidatedfunction is_cqe_immfunction is_cqe_wr_immfunction ocrdma_resolve_dmacfunction ocrdma_get_eq_table_indexfunction ocrdma_get_asic_typefunction ocrdma_get_pfc_priofunction ocrdma_get_app_priofunction ocrdma_is_enabled_and_syncedfunction ocrdma_get_ae_link_statefunction ocrdma_is_udp_encap_supported
Annotated Snippet
struct ocrdma_dev_attr {
u8 fw_ver[32];
u32 vendor_id;
u32 device_id;
u16 max_pd;
u16 max_dpp_pds;
u16 max_cq;
u16 max_cqe;
u16 max_qp;
u16 max_wqe;
u16 max_rqe;
u16 max_srq;
u32 max_inline_data;
int max_send_sge;
int max_recv_sge;
int max_srq_sge;
int max_rdma_sge;
int max_mr;
u64 max_mr_size;
u32 max_num_mr_pbl;
int max_mw;
int max_map_per_fmr;
int max_pages_per_frmr;
u16 max_ord_per_qp;
u16 max_ird_per_qp;
int device_cap_flags;
u8 cq_overflow_detect;
u8 srq_supported;
u32 wqe_size;
u32 rqe_size;
u32 ird_page_size;
u8 local_ca_ack_delay;
u8 ird;
u8 num_ird_pages;
u8 udp_encap;
};
struct ocrdma_dma_mem {
void *va;
dma_addr_t pa;
u32 size;
};
struct ocrdma_pbl {
void *va;
dma_addr_t pa;
};
struct ocrdma_queue_info {
void *va;
dma_addr_t dma;
u32 size;
u16 len;
u16 entry_size; /* Size of an element in the queue */
u16 id; /* qid, where to ring the doorbell. */
u16 head, tail;
bool created;
};
struct ocrdma_aic_obj { /* Adaptive interrupt coalescing (AIC) info */
u32 prev_eqd;
u64 eq_intr_cnt;
u64 prev_eq_intr_cnt;
};
struct ocrdma_eq {
struct ocrdma_queue_info q;
u32 vector;
int cq_cnt;
struct ocrdma_dev *dev;
char irq_name[32];
struct ocrdma_aic_obj aic_obj;
};
struct ocrdma_mq {
struct ocrdma_queue_info sq;
struct ocrdma_queue_info cq;
bool rearm_cq;
};
struct mqe_ctx {
struct mutex lock; /* for serializing mailbox commands on MQ */
wait_queue_head_t cmd_wait;
u32 tag;
u16 cqe_status;
u16 ext_status;
bool cmd_done;
bool fw_error_state;
Annotation
- Immediate include surface: `linux/mutex.h`, `linux/list.h`, `linux/spinlock.h`, `linux/pci.h`, `rdma/ib_verbs.h`, `rdma/ib_user_verbs.h`, `rdma/ib_addr.h`, `be_roce.h`.
- Detected declarations: `struct ocrdma_dev_attr`, `struct ocrdma_dma_mem`, `struct ocrdma_pbl`, `struct ocrdma_queue_info`, `struct ocrdma_aic_obj`, `struct ocrdma_eq`, `struct ocrdma_mq`, `struct mqe_ctx`, `struct ocrdma_hw_mr`, `struct ocrdma_mr`.
- 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.
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.