drivers/infiniband/hw/hns/hns_roce_debugfs.h

Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/hns/hns_roce_debugfs.h

File Facts

System
Linux kernel
Corpus path
drivers/infiniband/hw/hns/hns_roce_debugfs.h
Extension
.h
Size
1258 bytes
Lines
60
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 hns_debugfs_seqfile {
	int (*read)(struct seq_file *seq, void *data);
	ssize_t (*write)(char *buf, size_t count, void *data);
	void *data;
};

struct hns_sw_stat_debugfs {
	struct dentry *root;
	struct hns_debugfs_seqfile sw_stat;
};

struct hns_roce_cc_param_attr {
	const char *name;
	int algo_type;
	u32 offset;
	u32 size;
	u32 max;
	u32 min;
};

struct hns_cc_param_seqfile {
	struct hns_debugfs_seqfile seqfile;
	const struct hns_roce_cc_param_attr *param_attr;
	int index;
};

#define HNS_ROCE_CC_PARAM_MAX_NUM 11

struct hns_cc_param_debugfs {
	struct dentry *root;
	struct hns_cc_param_seqfile params[HNS_ROCE_CC_PARAM_MAX_NUM];
};

#define CONG_TYPE_MAX_NUM 4

/* Debugfs for device */
struct hns_roce_dev_debugfs {
	struct dentry *root;
	struct hns_sw_stat_debugfs sw_stat_root;
	struct hns_cc_param_debugfs cc_param_root[CONG_TYPE_MAX_NUM];
};

struct hns_roce_dev;

void hns_roce_init_debugfs(void);
void hns_roce_cleanup_debugfs(void);
void hns_roce_register_debugfs(struct hns_roce_dev *hr_dev);
void hns_roce_unregister_debugfs(struct hns_roce_dev *hr_dev);

#endif

Annotation

Implementation Notes