drivers/infiniband/hw/hns/hns_roce_bond.h

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

File Facts

System
Linux kernel
Corpus path
drivers/infiniband/hw/hns/hns_roce_bond.h
Extension
.h
Size
2150 bytes
Lines
96
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_roce_func_info {
	struct net_device *net_dev;
	struct hnae3_handle *handle;
};

struct hns_roce_bond_group {
	struct net_device *upper_dev;
	struct hns_roce_dev *main_hr_dev;
	u8 active_slave_num;
	u32 slave_map;
	u32 active_slave_map;
	u8 bond_id;
	u8 bus_num;
	struct hns_roce_func_info bond_func_info[ROCE_BOND_FUNC_MAX];
	bool bond_ready;
	enum hns_roce_bond_state bond_state;
	enum netdev_lag_tx_type tx_type;
	enum netdev_lag_hash hash_type;
	struct mutex bond_mutex;
	struct notifier_block bond_nb;
	struct delayed_work bond_work;
};

struct hns_roce_die_info {
	u8 bond_id_mask;
	struct hns_roce_bond_group *bgrps[ROCE_BOND_NUM_MAX];
	struct mutex die_mutex;
	u8 suspend_cnt;
};

struct hns_roce_bond_group *hns_roce_get_bond_grp(struct net_device *net_dev,
						  u8 bus_num);
int hns_roce_alloc_bond_grp(struct hns_roce_dev *hr_dev);
void hns_roce_dealloc_bond_grp(void);
void hns_roce_cleanup_bond(struct hns_roce_bond_group *bond_grp);
bool hns_roce_bond_is_active(struct hns_roce_dev *hr_dev);
int hns_roce_bond_init(struct hns_roce_dev *hr_dev);
void hns_roce_bond_suspend(struct hnae3_handle *handle);
void hns_roce_bond_resume(struct hnae3_handle *handle);

#endif

Annotation

Implementation Notes