drivers/net/ethernet/marvell/octeontx2/nic/qos.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/marvell/octeontx2/nic/qos.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/marvell/octeontx2/nic/qos.h
Extension
.h
Size
2074 bytes
Lines
79
Domain
Driver Families
Bucket
drivers/net
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 otx2_qos_cfg {
	u16 schq[NIX_TXSCH_LVL_CNT];
	u16 schq_contig[NIX_TXSCH_LVL_CNT];
	int static_node_pos[NIX_TXSCH_LVL_CNT];
	int dwrr_node_pos[NIX_TXSCH_LVL_CNT];
	u16 schq_contig_list[NIX_TXSCH_LVL_CNT][MAX_TXSCHQ_PER_FUNC];
	u16 schq_list[NIX_TXSCH_LVL_CNT][MAX_TXSCHQ_PER_FUNC];
	bool schq_index_used[NIX_TXSCH_LVL_CNT][MAX_TXSCHQ_PER_FUNC];
};

struct otx2_qos {
	DECLARE_HASHTABLE(qos_hlist, order_base_2(OTX2_QOS_MAX_LEAF_NODES));
	struct mutex qos_lock; /* child list lock */
	u16 qid_to_sqmap[OTX2_QOS_MAX_LEAF_NODES];
	struct list_head qos_tree;
	DECLARE_BITMAP(qos_sq_bmap, OTX2_QOS_MAX_LEAF_NODES);
	u16 maj_id;
	u16 defcls;
	u8  link_cfg_lvl; /* LINKX_CFG CSRs mapped to TL3 or TL2's index ? */
};

struct otx2_qos_node {
	struct list_head list; /* list management */
	struct list_head child_list;
	struct list_head child_schq_list;
	struct hlist_node hlist;
	DECLARE_BITMAP(prio_bmap, OTX2_QOS_MAX_PRIO + 1);
	struct otx2_qos_node *parent;	/* parent qos node */
	u64 rate; /* htb params */
	u64 ceil;
	u32 classid;
	u32 prio;
	u32 quantum;
	/* hw txschq */
	u16 schq;
	u16 qid;
	u16 prio_anchor;
	u16 max_static_prio;
	u16 child_dwrr_cnt;
	u16 child_static_cnt;
	u16 child_dwrr_prio;
	u16 txschq_idx;			/* txschq allocation index */
	u8 level;
	bool is_static;
};


#endif

Annotation

Implementation Notes