drivers/infiniband/hw/hfi1/verbs.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/hfi1/verbs.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/hw/hfi1/verbs.h- Extension
.h- Size
- 13223 bytes
- Lines
- 488
- 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/types.hlinux/seqlock.hlinux/kernel.hlinux/interrupt.hlinux/kref.hlinux/workqueue.hlinux/kthread.hlinux/completion.hlinux/slab.hrdma/ib_pack.hrdma/ib_user_verbs.hrdma/ib_mad.hrdma/ib_hdrs.hrdma/rdma_vt.hrdma/rdmavt_qp.hrdma/rdmavt_cq.hiowait.htid_rdma.hopfn.h
Detected Declarations
struct hfi1_ctxtdatastruct hfi1_pportdatastruct hfi1_devdatastruct hfi1_packetstruct opa_16b_mgmtstruct hfi1_16b_headerstruct hfi1_opa_headerstruct hfi1_ahg_infostruct hfi1_sdma_headerstruct hfi1_qp_privstruct hfi1_swqe_privstruct hfi1_ack_privstruct iowait_workstruct hfi1_pkt_statestruct hfi1_opcode_statsstruct hfi1_opcode_stats_perctxstruct hfi1_ibportstruct hfi1_ibdevstruct verbs_txreqfunction inc_opstatsfunction cmp_psnfunction mask_psnfunction delta_psnfunction onefunction full_flow_psnfunction opa_bth_is_migrationfunction hfi1_trdma_send_complete
Annotated Snippet
struct opa_16b_mgmt {
__be32 dest_qpn;
__be32 src_qpn;
};
struct hfi1_16b_header {
u32 lrh[4];
union {
struct {
struct ib_grh grh;
struct ib_other_headers oth;
} l;
struct ib_other_headers oth;
struct opa_16b_mgmt mgmt;
} u;
} __packed;
struct hfi1_opa_header {
union {
struct ib_header ibh; /* 9B header */
struct hfi1_16b_header opah; /* 16B header */
};
u8 hdr_type; /* 9B or 16B */
} __packed;
struct hfi1_ahg_info {
u32 ahgdesc[2];
u16 tx_flags;
u8 ahgcount;
u8 ahgidx;
};
struct hfi1_sdma_header {
__le64 pbc;
struct hfi1_opa_header hdr;
} __packed;
/*
* hfi1 specific data structures that will be hidden from rvt after the queue
* pair is made common
*/
struct hfi1_qp_priv {
struct hfi1_ahg_info *s_ahg; /* ahg info for next header */
struct sdma_engine *s_sde; /* current sde */
struct send_context *s_sendcontext; /* current sendcontext */
struct hfi1_ctxtdata *rcd; /* QP's receive context */
struct page **pages; /* for TID page scan */
u32 tid_enqueue; /* saved when tid waited */
u8 s_sc; /* SC[0..4] for next packet */
struct iowait s_iowait;
struct timer_list s_tid_timer; /* for timing tid wait */
struct timer_list s_tid_retry_timer; /* for timing tid ack */
struct list_head tid_wait; /* for queueing tid space */
struct hfi1_opfn_data opfn;
struct tid_flow_state flow_state;
struct tid_rdma_qp_params tid_rdma;
struct rvt_qp *owner;
u16 s_running_pkt_size;
u8 hdr_type; /* 9B or 16B */
struct rvt_sge_state tid_ss; /* SGE state pointer for 2nd leg */
atomic_t n_requests; /* # of TID RDMA requests in the */
/* queue */
atomic_t n_tid_requests; /* # of sent TID RDMA requests */
unsigned long tid_timer_timeout_jiffies;
unsigned long tid_retry_timeout_jiffies;
/* variables for the TID RDMA SE state machine */
u8 s_state;
u8 s_retry;
u8 rnr_nak_state; /* RNR NAK state */
u8 s_nak_state;
u32 s_nak_psn;
u32 s_flags;
u32 s_tid_cur;
u32 s_tid_head;
u32 s_tid_tail;
u32 r_tid_head; /* Most recently added TID RDMA request */
u32 r_tid_tail; /* the last completed TID RDMA request */
u32 r_tid_ack; /* the TID RDMA request to be ACK'ed */
u32 r_tid_alloc; /* Request for which we are allocating resources */
u32 pending_tid_w_segs; /* Num of pending tid write segments */
u32 pending_tid_w_resp; /* Num of pending tid write responses */
u32 alloc_w_segs; /* Number of segments for which write */
/* resources have been allocated for this QP */
/* For TID RDMA READ */
u32 tid_r_reqs; /* Num of tid reads requested */
u32 tid_r_comp; /* Num of tid reads completed */
u32 pending_tid_r_segs; /* Num of pending tid read segments */
u16 pkts_ps; /* packets per segment */
Annotation
- Immediate include surface: `linux/types.h`, `linux/seqlock.h`, `linux/kernel.h`, `linux/interrupt.h`, `linux/kref.h`, `linux/workqueue.h`, `linux/kthread.h`, `linux/completion.h`.
- Detected declarations: `struct hfi1_ctxtdata`, `struct hfi1_pportdata`, `struct hfi1_devdata`, `struct hfi1_packet`, `struct opa_16b_mgmt`, `struct hfi1_16b_header`, `struct hfi1_opa_header`, `struct hfi1_ahg_info`, `struct hfi1_sdma_header`, `struct hfi1_qp_priv`.
- 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.