STRUCT QP_INFO(9)
π NAME π
struct qp_info β the QP (share queue region) attributes structure, bestie. Basically the whole personality of an offloaded connection's queues in one struct π«Ά
β¨ SYNOPSIS β¨
struct qp_info {
void __iomem *ctx_base;
#define DPM_TRIGER_TYPE 0x40;
#define BNX2I_570x_QUE_DB_SIZE 0;
#define BNX2I_5771x_QUE_DB_SIZE 16;
struct sqe *sq_virt;
dma_addr_t sq_phys;
u32 sq_mem_size;
struct sqe *sq_prod_qe;
struct sqe *sq_cons_qe;
struct sqe *sq_first_qe;
struct sqe *sq_last_qe;
u16 sq_prod_idx;
u16 sq_cons_idx;
u32 sqe_left;
void *sq_pgtbl_virt;
dma_addr_t sq_pgtbl_phys;
u32 sq_pgtbl_size;
struct cqe *cq_virt;
dma_addr_t cq_phys;
u32 cq_mem_size;
struct cqe *cq_prod_qe;
struct cqe *cq_cons_qe;
struct cqe *cq_first_qe;
struct cqe *cq_last_qe;
u16 cq_prod_idx;
u16 cq_cons_idx;
u32 cqe_left;
u32 cqe_size;
u32 cqe_exp_seq_sn;
void *cq_pgtbl_virt;
dma_addr_t cq_pgtbl_phys;
u32 cq_pgtbl_size;
struct rqe *rq_virt;
dma_addr_t rq_phys;
u32 rq_mem_size;
struct rqe *rq_prod_qe;
struct rqe *rq_cons_qe;
struct rqe *rq_first_qe;
struct rqe *rq_last_qe;
u16 rq_prod_idx;
u16 rq_cons_idx;
u32 rqe_left;
void *rq_pgtbl_virt;
dma_addr_t rq_pgtbl_phys;
u32 rq_pgtbl_size;
};
π Members π
Three whole queue squads live in here β SQ, CQ and RQ β plus their page tables. Meet the cast π
ctx_baseβ the ioremapped PCI register base you use to poke the doorbell register that belongs to this offloaded connection. It's the "hey, I'm done" button, lowkey π
the send queue (SQ) era
sq_virtβ virtual address of the send queue (SQ) regionsq_physβ DMA address of the SQ memory regionsq_mem_sizeβ SQ sizesq_prod_qeβ SQ producer entry pointersq_cons_qeβ SQ consumer entry pointersq_first_qeβ virtual address of the first entry in SQsq_last_qeβ virtual address of the last entry in SQsq_prod_idxβ SQ producer indexsq_cons_idxβ SQ consumer indexsqe_leftβ number of SQ entries leftsq_pgtbl_virtβ page table describing the buffer constituting the SQ regionsq_pgtbl_physβ DMA address ofsq_pgtbl_virtsq_pgtbl_sizeβ SQ page table size
the completion queue (CQ) era
cq_virtβ virtual address of the completion queue (CQ) regioncq_physβ DMA address of the RQ memory regioncq_mem_sizeβ CQ sizecq_prod_qeβ CQ producer entry pointercq_cons_qeβ CQ consumer entry pointercq_first_qeβ virtual address of the first entry in CQcq_last_qeβ virtual address of the last entry in CQcq_prod_idxβ CQ producer indexcq_cons_idxβ CQ consumer indexcqe_leftβ number of CQ entries leftcqe_sizeβ size of each CQ entrycqe_exp_seq_snβ next expected CQE sequence number π’cq_pgtbl_virtβ page table describing the buffer constituting the CQ regioncq_pgtbl_physβ DMA address ofcq_pgtbl_virtcq_pgtbl_sizeβ CQ page table size
the receive queue (RQ) era
rq_virtβ virtual address of the receive queue (RQ) regionrq_physβ DMA address of the RQ memory regionrq_mem_sizeβ RQ sizerq_prod_qeβ RQ producer entry pointerrq_cons_qeβ RQ consumer entry pointerrq_first_qeβ virtual address of the first entry in RQrq_last_qeβ virtual address of the last entry in RQrq_prod_idxβ RQ producer indexrq_cons_idxβ RQ consumer indexrqe_leftβ number of RQ entries leftrq_pgtbl_virtβ page table describing the buffer constituting the RQ regionrq_pgtbl_physβ DMA address ofrq_pgtbl_virtrq_pgtbl_sizeβ RQ page table size
π¦ Description π¦
Okay so picture this: a queue pair (QP) is a per-connection shared data structure. It's the main character for three jobs β sending work requests (SQ), receiving completion notifications (CQ), and receiving asynchronous / scsi sense info (RQ). The qp_info structure below holds the queue memory, the consumer/producer indexes, and the page table information for all of it β¨
Heads up bestie: the defines in the synopsis are literally namedDPM_TRIGER_TYPE,BNX2I_570x_QUE_DB_SIZEandBNX2I_5771x_QUE_DB_SIZEβ spell them exactly like that, typos and all, or the compiler will absolutely humble you π
π SEE ALSO π
Kernel file ./drivers/scsi/bnx2i/bnx2i.h β go read up on struct generic_pdu_resc(9), struct bd_resc_page(9), struct io_bdt(9), struct bnx2i_conn(9), struct iscsi_cid_queue(9), struct bnx2i_hba(9), struct bnx2i_endpoint(9). The whole friend group fr fr π«Ά
That's the whole vibe check π This page came from ./drivers/scsi/bnx2i, dated October 2026 β struct qp_info(9), slay, no cap, periodt πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms