drivers/infiniband/hw/mana/mana_ib.h

Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/mana/mana_ib.h

File Facts

System
Linux kernel
Corpus path
drivers/infiniband/hw/mana/mana_ib.h
Extension
.h
Size
19124 bytes
Lines
773
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 mana_ib_adapter_caps {
	u32 max_sq_id;
	u32 max_rq_id;
	u32 max_cq_id;
	u32 max_qp_count;
	u32 max_cq_count;
	u32 max_mr_count;
	u32 max_pd_count;
	u32 max_inbound_read_limit;
	u32 max_outbound_read_limit;
	u32 mw_count;
	u32 max_srq_count;
	u32 max_qp_wr;
	u32 max_send_sge_count;
	u32 max_recv_sge_count;
	u32 max_inline_data_size;
	u64 feature_flags;
	u64 page_size_cap;
};

struct mana_ib_queue {
	struct ib_umem *umem;
	struct gdma_queue *kmem;
	u64 gdma_region;
	u64 id;
};

struct mana_ib_dev {
	struct ib_device ib_dev;
	struct gdma_dev *gdma_dev;
	mana_handle_t adapter_handle;
	struct gdma_queue *fatal_err_eq;
	struct gdma_queue **eqs;
	struct xarray qp_table_wq;
	struct mana_ib_adapter_caps adapter_caps;
	struct dma_pool *av_pool;
	netdevice_tracker dev_tracker;
	struct notifier_block nb;
};

struct mana_ib_wq {
	struct ib_wq ibwq;
	struct mana_ib_queue queue;
	int wqe;
	u32 wq_buf_size;
	mana_handle_t rx_object;
};

struct mana_ib_pd {
	struct ib_pd ibpd;
	u32 pdn;
	mana_handle_t pd_handle;

	/* Mutex for sharing access to vport_use_count */
	struct mutex vport_mutex;
	int vport_use_count;

	/* Port bound to this PD for raw QP usage. Only valid when
	 * vport_use_count > 0. A PD can only be associated with a
	 * single physical port because per-port EQs and vport
	 * configuration are tied to the PD's refcount.
	 */
	u32 vport_port;

	/* Only one RSS QP is allowed per vport because each RSS QP
	 * overwrites the vport steering config (indirection table /
	 * hash key) and mana_disable_vport_rx() on destroy would
	 * blackhole traffic for any other RSS QP on the same vport.
	 */
	bool has_rss_qp;

	bool tx_shortform_allowed;
	u32 tx_vp_offset;
};

struct mana_ib_av {
	u8 dest_ip[16];
	u8 dest_mac[ETH_ALEN];
	u16 udp_src_port;
	u8 src_ip[16];
	u32 hop_limit	: 8;
	u32 reserved1	: 12;
	u32 dscp	: 6;
	u32 reserved2	: 5;
	u32 is_ipv6	: 1;
	u32 reserved3	: 32;
};

struct mana_ib_ah {
	struct ib_ah ibah;

Annotation

Implementation Notes