drivers/infiniband/hw/bnxt_re/roce_hsi.h

Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/bnxt_re/roce_hsi.h

File Facts

System
Linux kernel
Corpus path
drivers/infiniband/hw/bnxt_re/roce_hsi.h
Extension
.h
Size
196209 bytes
Lines
4735
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct tx_doorbell {
	__le32	key_idx;
	#define TX_DOORBELL_IDX_MASK 0xffffffUL
	#define TX_DOORBELL_IDX_SFT 0
	#define TX_DOORBELL_KEY_MASK 0xf0000000UL
	#define TX_DOORBELL_KEY_SFT 28
	#define TX_DOORBELL_KEY_TX    (0x0UL << 28)
	#define TX_DOORBELL_KEY_LAST TX_DOORBELL_KEY_TX
};

/* rx_doorbell (size:32b/4B) */
struct rx_doorbell {
	__le32	key_idx;
	#define RX_DOORBELL_IDX_MASK 0xffffffUL
	#define RX_DOORBELL_IDX_SFT 0
	#define RX_DOORBELL_KEY_MASK 0xf0000000UL
	#define RX_DOORBELL_KEY_SFT 28
	#define RX_DOORBELL_KEY_RX    (0x1UL << 28)
	#define RX_DOORBELL_KEY_LAST RX_DOORBELL_KEY_RX
};

/* cmpl_doorbell (size:32b/4B) */
struct cmpl_doorbell {
	__le32	key_mask_valid_idx;
	#define CMPL_DOORBELL_IDX_MASK      0xffffffUL
	#define CMPL_DOORBELL_IDX_SFT       0
	#define CMPL_DOORBELL_IDX_VALID     0x4000000UL
	#define CMPL_DOORBELL_MASK          0x8000000UL
	#define CMPL_DOORBELL_KEY_MASK      0xf0000000UL
	#define CMPL_DOORBELL_KEY_SFT       28
	#define CMPL_DOORBELL_KEY_CMPL        (0x2UL << 28)
	#define CMPL_DOORBELL_KEY_LAST       CMPL_DOORBELL_KEY_CMPL
};

/* status_doorbell (size:32b/4B) */
struct status_doorbell {
	__le32	key_idx;
	#define STATUS_DOORBELL_IDX_MASK 0xffffffUL
	#define STATUS_DOORBELL_IDX_SFT 0
	#define STATUS_DOORBELL_KEY_MASK 0xf0000000UL
	#define STATUS_DOORBELL_KEY_SFT 28
	#define STATUS_DOORBELL_KEY_STAT  (0x3UL << 28)
	#define STATUS_DOORBELL_KEY_LAST STATUS_DOORBELL_KEY_STAT
};

/* cmdq_init (size:128b/16B) */
struct cmdq_init {
	__le64	cmdq_pbl;
	__le16	cmdq_size_cmdq_lvl;
	#define CMDQ_INIT_CMDQ_LVL_MASK 0x3UL
	#define CMDQ_INIT_CMDQ_LVL_SFT  0
	#define CMDQ_INIT_CMDQ_SIZE_MASK 0xfffcUL
	#define CMDQ_INIT_CMDQ_SIZE_SFT 2
	__le16	creq_ring_id;
	__le32	prod_idx;
};

/* cmdq_base (size:128b/16B) */
struct cmdq_base {
	u8	opcode;
	#define CMDQ_BASE_OPCODE_CREATE_QP              0x1UL
	#define CMDQ_BASE_OPCODE_DESTROY_QP             0x2UL
	#define CMDQ_BASE_OPCODE_MODIFY_QP              0x3UL
	#define CMDQ_BASE_OPCODE_QUERY_QP               0x4UL
	#define CMDQ_BASE_OPCODE_CREATE_SRQ             0x5UL
	#define CMDQ_BASE_OPCODE_DESTROY_SRQ            0x6UL
	#define CMDQ_BASE_OPCODE_QUERY_SRQ              0x8UL
	#define CMDQ_BASE_OPCODE_CREATE_CQ              0x9UL
	#define CMDQ_BASE_OPCODE_DESTROY_CQ             0xaUL
	#define CMDQ_BASE_OPCODE_RESIZE_CQ              0xcUL
	#define CMDQ_BASE_OPCODE_ALLOCATE_MRW           0xdUL
	#define CMDQ_BASE_OPCODE_DEALLOCATE_KEY         0xeUL
	#define CMDQ_BASE_OPCODE_REGISTER_MR            0xfUL
	#define CMDQ_BASE_OPCODE_DEREGISTER_MR          0x10UL
	#define CMDQ_BASE_OPCODE_ADD_GID                0x11UL
	#define CMDQ_BASE_OPCODE_DELETE_GID             0x12UL
	#define CMDQ_BASE_OPCODE_MODIFY_GID             0x17UL
	#define CMDQ_BASE_OPCODE_QUERY_GID              0x18UL
	#define CMDQ_BASE_OPCODE_CREATE_QP1             0x13UL
	#define CMDQ_BASE_OPCODE_DESTROY_QP1            0x14UL
	#define CMDQ_BASE_OPCODE_CREATE_AH              0x15UL
	#define CMDQ_BASE_OPCODE_DESTROY_AH             0x16UL
	#define CMDQ_BASE_OPCODE_INITIALIZE_FW          0x80UL
	#define CMDQ_BASE_OPCODE_DEINITIALIZE_FW        0x81UL
	#define CMDQ_BASE_OPCODE_STOP_FUNC              0x82UL
	#define CMDQ_BASE_OPCODE_QUERY_FUNC             0x83UL
	#define CMDQ_BASE_OPCODE_SET_FUNC_RESOURCES     0x84UL
	#define CMDQ_BASE_OPCODE_READ_CONTEXT           0x85UL
	#define CMDQ_BASE_OPCODE_VF_BACKCHANNEL_REQUEST 0x86UL
	#define CMDQ_BASE_OPCODE_READ_VF_MEMORY         0x87UL

Annotation

Implementation Notes