drivers/infiniband/hw/bnxt_re/qplib_res.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/bnxt_re/qplib_res.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/hw/bnxt_re/qplib_res.h- Extension
.h- Size
- 17753 bytes
- Lines
- 643
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bnxt/ulp.h
Detected Declarations
struct bnxt_qplib_drv_modesstruct bnxt_qplib_chip_ctxstruct bnxt_qplib_db_pacing_datastruct bnxt_qplib_reg_descstruct bnxt_qplib_pblstruct bnxt_qplib_sg_infostruct bnxt_qplib_hwq_attrstruct bnxt_qplib_hwqstruct bnxt_qplib_db_infostruct bnxt_qplib_pd_tblstruct bnxt_qplib_sgid_tblstruct bnxt_qplib_dpistruct bnxt_qplib_dpi_tblstruct bnxt_qplib_statsstruct bnxt_qplib_vf_resstruct bnxt_qplib_tqm_ctxstruct bnxt_qplib_ctxstruct bnxt_qplib_resstruct bnxt_qplib_pdstruct bnxt_qplib_dev_attrenum bnxt_re_toggle_modesenum bnxt_qplib_hwq_typeenum bnxt_qplib_pbl_lvlenum bnxt_qplib_hwrm_pg_sizeenum bnxt_qplib_db_info_flags_maskenum bnxt_qplib_db_epoch_flag_shiftfunction bnxt_qplib_is_chip_gen_p7function bnxt_qplib_is_chip_gen_p5function bnxt_qplib_is_chip_gen_p5_p7function bnxt_qplib_get_hwq_typefunction bnxt_qplib_get_ring_typefunction bnxt_qplib_get_base_addrfunction bnxt_qplib_base_pg_sizefunction bnxt_qplib_hwq_incr_prodfunction bnxt_qplib_hwq_incr_consfunction bnxt_qplib_ring_db32function bnxt_qplib_ring_dbfunction bnxt_qplib_ring_prod_dbfunction bnxt_qplib_armen_dbfunction bnxt_qplib_srq_arm_dbfunction bnxt_qplib_ring_nq_dbfunction _is_ext_stats_supportedfunction bnxt_ext_stats_supportedfunction _is_hw_retx_supportedfunction _is_host_msn_tablefunction bnxt_qplib_dbr_pacing_enfunction bnxt_qplib_roce_mirror_supportedfunction _is_alloc_mr_unified
Annotated Snippet
struct bnxt_qplib_drv_modes {
u8 wqe_mode;
bool db_push;
bool dbr_pacing;
u32 toggle_bits;
u8 roce_mirror;
};
enum bnxt_re_toggle_modes {
BNXT_QPLIB_CQ_TOGGLE_BIT = 0x1,
BNXT_QPLIB_SRQ_TOGGLE_BIT = 0x2,
};
struct bnxt_qplib_chip_ctx {
u16 chip_num;
u8 chip_rev;
u8 chip_metal;
u16 hw_stats_size;
u16 hwrm_cmd_max_timeout;
struct bnxt_qplib_drv_modes modes;
u64 hwrm_intf_ver;
u32 dbr_stat_db_fifo;
};
struct bnxt_qplib_db_pacing_data {
u32 do_pacing;
u32 pacing_th;
u32 alarm_th;
u32 fifo_max_depth;
u32 fifo_room_mask;
u32 fifo_room_shift;
u32 grc_reg_offset;
u32 dev_err_state;
};
#define BNXT_QPLIB_DBR_PF_DB_OFFSET 0x10000
#define BNXT_QPLIB_DBR_VF_DB_OFFSET 0x4000
#define PTR_CNT_PER_PG (PAGE_SIZE / sizeof(void *))
#define PTR_MAX_IDX_PER_PG (PTR_CNT_PER_PG - 1)
#define PTR_PG(x) (((x) & ~PTR_MAX_IDX_PER_PG) / PTR_CNT_PER_PG)
#define PTR_IDX(x) ((x) & PTR_MAX_IDX_PER_PG)
#define HWQ_CMP(idx, hwq) ((idx) & ((hwq)->max_elements - 1))
#define HWQ_FREE_SLOTS(hwq) (hwq->max_elements - \
((HWQ_CMP(hwq->prod, hwq)\
- HWQ_CMP(hwq->cons, hwq))\
& (hwq->max_elements - 1)))
enum bnxt_qplib_hwq_type {
HWQ_TYPE_CTX,
HWQ_TYPE_QUEUE,
HWQ_TYPE_L2_CMPL,
HWQ_TYPE_MR
};
#define MAX_PBL_LVL_0_PGS 1
#define MAX_PBL_LVL_1_PGS 512
#define MAX_PBL_LVL_1_PGS_SHIFT 9
#define MAX_PBL_LVL_1_PGS_FOR_LVL_2 256
#define MAX_PBL_LVL_2_PGS (256 * 512)
#define MAX_PDL_LVL_SHIFT 9
enum bnxt_qplib_pbl_lvl {
PBL_LVL_0,
PBL_LVL_1,
PBL_LVL_2,
PBL_LVL_MAX
};
#define ROCE_PG_SIZE_4K (4 * 1024)
#define ROCE_PG_SIZE_8K (8 * 1024)
#define ROCE_PG_SIZE_64K (64 * 1024)
#define ROCE_PG_SIZE_2M (2 * 1024 * 1024)
#define ROCE_PG_SIZE_8M (8 * 1024 * 1024)
#define ROCE_PG_SIZE_1G (1024 * 1024 * 1024)
enum bnxt_qplib_hwrm_pg_size {
BNXT_QPLIB_HWRM_PG_SIZE_4K = 0,
BNXT_QPLIB_HWRM_PG_SIZE_8K = 1,
BNXT_QPLIB_HWRM_PG_SIZE_64K = 2,
BNXT_QPLIB_HWRM_PG_SIZE_2M = 3,
BNXT_QPLIB_HWRM_PG_SIZE_8M = 4,
BNXT_QPLIB_HWRM_PG_SIZE_1G = 5,
};
struct bnxt_qplib_reg_desc {
u8 bar_id;
resource_size_t bar_base;
unsigned long offset;
Annotation
- Immediate include surface: `linux/bnxt/ulp.h`.
- Detected declarations: `struct bnxt_qplib_drv_modes`, `struct bnxt_qplib_chip_ctx`, `struct bnxt_qplib_db_pacing_data`, `struct bnxt_qplib_reg_desc`, `struct bnxt_qplib_pbl`, `struct bnxt_qplib_sg_info`, `struct bnxt_qplib_hwq_attr`, `struct bnxt_qplib_hwq`, `struct bnxt_qplib_db_info`, `struct bnxt_qplib_pd_tbl`.
- Atlas domain: Driver Families / drivers/infiniband.
- Implementation status: source implementation candidate.
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.