include/rdma/rdmavt_qp.h
Source file repositories/reference/linux-study-clean/include/rdma/rdmavt_qp.h
File Facts
- System
- Linux kernel
- Corpus path
include/rdma/rdmavt_qp.h- Extension
.h- Size
- 28774 bytes
- Lines
- 1007
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
rdma/rdma_vt.hrdma/ib_pack.hrdma/ib_verbs.hrdma/rdmavt_cq.hrdma/rvt-abi.hlinux/vmalloc.h
Detected Declarations
struct rvt_ud_wrstruct rvt_swqestruct rvt_krwqstruct rvt_rqstruct rvt_ack_entrystruct rvt_operation_paramsstruct rvt_qpstruct rvt_srqstruct rvt_qpn_mapstruct rvt_qpn_tablestruct rvt_qp_ibdevstruct rvt_mcast_qpstruct rvt_mcast_addrstruct rvt_mcaststruct rvt_dev_infostruct rvt_qp_iterfunction rvt_get_swqe_remote_qpnfunction rvt_get_swqe_remote_qkeyfunction rvt_get_swqe_pkey_indexfunction rvt_get_rq_countfunction rvt_is_user_qpfunction rvt_get_qpfunction rvt_put_qpfunction rvt_put_swqefunction rvt_qp_wqe_reservefunction smp_mp__after_atomicfunction rvt_cmp_msnfunction rvt_div_round_up_mtufunction rvt_div_mtufunction rvt_timeout_to_jiffiesfunction rcu_read_lockfunction rvt_mod_retry_timer_extfunction rvt_mod_retry_timerfunction rvt_put_qp_swqefunction rvt_qp_swqe_incrfunction rvt_recv_cqfunction rvt_send_cqfunction rvt_qp_complete_swqefunction rvt_add_retry_timerfunction ib_cq_tailfunction ib_cq_headfunction rvt_mmap_infofunction rvt_rc_credit_availfunction rvt_cmp_msn
Annotated Snippet
struct rvt_ud_wr {
struct ib_ud_wr wr;
struct rdma_ah_attr *attr;
};
/*
* Send work request queue entry.
* The size of the sg_list is determined when the QP is created and stored
* in qp->s_max_sge.
*/
struct rvt_swqe {
union {
struct ib_send_wr wr; /* don't use wr.sg_list */
struct rvt_ud_wr ud_wr;
struct ib_reg_wr reg_wr;
struct ib_rdma_wr rdma_wr;
struct ib_atomic_wr atomic_wr;
};
u32 psn; /* first packet sequence number */
u32 lpsn; /* last packet sequence number */
u32 ssn; /* send sequence number */
u32 length; /* total length of data in sg_list */
void *priv; /* driver dependent field */
struct rvt_sge sg_list[];
};
/**
* struct rvt_krwq - kernel struct receive work request
* @p_lock: lock to protect producer of the kernel buffer
* @head: index of next entry to fill
* @c_lock: lock to protect consumer of the kernel buffer
* @tail: index of next entry to pull
* @count: count is approximate of total receive entries posted
* @curr_wq: struct of receive work request queue entry
*
* This structure is used to contain the head pointer,
* tail pointer and receive work queue entries for kernel
* mode user.
*/
struct rvt_krwq {
spinlock_t p_lock; /* protect producer */
u32 head; /* new work requests posted to the head */
/* protect consumer */
spinlock_t c_lock ____cacheline_aligned_in_smp;
u32 tail; /* receives pull requests from here. */
u32 count; /* approx count of receive entries posted */
struct rvt_rwqe *curr_wq;
struct rvt_rwqe wq[];
};
/*
* rvt_get_swqe_ah - Return the pointer to the struct rvt_ah
* @swqe: valid Send WQE
*
*/
static inline struct rvt_ah *rvt_get_swqe_ah(struct rvt_swqe *swqe)
{
return ibah_to_rvtah(swqe->ud_wr.wr.ah);
}
/**
* rvt_get_swqe_ah_attr - Return the cached ah attribute information
* @swqe: valid Send WQE
*
*/
static inline struct rdma_ah_attr *rvt_get_swqe_ah_attr(struct rvt_swqe *swqe)
{
return swqe->ud_wr.attr;
}
/**
* rvt_get_swqe_remote_qpn - Access the remote QPN value
* @swqe: valid Send WQE
*
*/
static inline u32 rvt_get_swqe_remote_qpn(struct rvt_swqe *swqe)
{
return swqe->ud_wr.wr.remote_qpn;
}
/**
* rvt_get_swqe_remote_qkey - Acces the remote qkey value
* @swqe: valid Send WQE
*
*/
static inline u32 rvt_get_swqe_remote_qkey(struct rvt_swqe *swqe)
{
return swqe->ud_wr.wr.remote_qkey;
}
Annotation
- Immediate include surface: `rdma/rdma_vt.h`, `rdma/ib_pack.h`, `rdma/ib_verbs.h`, `rdma/rdmavt_cq.h`, `rdma/rvt-abi.h`, `linux/vmalloc.h`.
- Detected declarations: `struct rvt_ud_wr`, `struct rvt_swqe`, `struct rvt_krwq`, `struct rvt_rq`, `struct rvt_ack_entry`, `struct rvt_operation_params`, `struct rvt_qp`, `struct rvt_srq`, `struct rvt_qpn_map`, `struct rvt_qpn_table`.
- Atlas domain: Repository Root And Misc / include.
- 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.