drivers/net/ethernet/hisilicon/hns3/hnae3.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/hisilicon/hns3/hnae3.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/hisilicon/hns3/hnae3.h- Extension
.h- Size
- 31814 bytes
- Lines
- 983
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/acpi.hlinux/dcbnl.hlinux/delay.hlinux/device.hlinux/ethtool.hlinux/module.hlinux/netdevice.hlinux/pci.hlinux/pkt_sched.hlinux/types.hlinux/bitmap.hnet/pkt_cls.hnet/pkt_sched.h
Detected Declarations
struct hnae3_handlestruct hnae3_queuestruct hns3_mac_statsstruct hnae3_vector_infostruct hnae3_ring_chain_nodestruct hnae3_dev_specsstruct hnae3_client_opsstruct hnae3_clientstruct hnae3_ae_devstruct hnae3_ae_opsstruct hnae3_dcb_opsstruct hnae3_ae_algostruct hnae3_tc_infostruct hnae3_knic_private_infostruct hnae3_roce_private_infostruct hnae3_handleenum HNAE3_DEV_CAP_BITSenum HNAE3_PF_CAP_BITSenum hnae3_loopenum hnae3_client_typeenum hnae3_media_typeenum hnae3_module_typeenum hnae3_fec_modeenum hnae3_reset_notify_typeenum hnae3_hw_error_typeenum hnae3_reset_typeenum hnae3_port_base_vlan_stateenum hnae3_dbg_cmdenum hnae3_tc_map_modeenum hnae3_pflagfunction hnae3_format_mac_addr
Annotated Snippet
struct hnae3_queue {
void __iomem *io_base;
void __iomem *mem_base;
struct hnae3_ae_algo *ae_algo;
struct hnae3_handle *handle;
int tqp_index; /* index in a handle */
u32 buf_size; /* size for hnae_desc->addr, preset by AE */
u16 tx_desc_num; /* total number of tx desc */
u16 rx_desc_num; /* total number of rx desc */
};
struct hns3_mac_stats {
u64 tx_pause_cnt;
u64 rx_pause_cnt;
};
/* hnae3 loop mode */
enum hnae3_loop {
HNAE3_LOOP_EXTERNAL,
HNAE3_LOOP_APP,
HNAE3_LOOP_SERIAL_SERDES,
HNAE3_LOOP_PARALLEL_SERDES,
HNAE3_LOOP_PHY,
HNAE3_LOOP_NONE,
};
enum hnae3_client_type {
HNAE3_CLIENT_KNIC,
HNAE3_CLIENT_ROCE,
};
/* mac media type */
enum hnae3_media_type {
HNAE3_MEDIA_TYPE_UNKNOWN,
HNAE3_MEDIA_TYPE_FIBER,
HNAE3_MEDIA_TYPE_COPPER,
HNAE3_MEDIA_TYPE_BACKPLANE,
HNAE3_MEDIA_TYPE_NONE,
};
/* must be consistent with definition in firmware */
enum hnae3_module_type {
HNAE3_MODULE_TYPE_UNKNOWN = 0x00,
HNAE3_MODULE_TYPE_FIBRE_LR = 0x01,
HNAE3_MODULE_TYPE_FIBRE_SR = 0x02,
HNAE3_MODULE_TYPE_AOC = 0x03,
HNAE3_MODULE_TYPE_CR = 0x04,
HNAE3_MODULE_TYPE_KR = 0x05,
HNAE3_MODULE_TYPE_TP = 0x06,
};
enum hnae3_fec_mode {
HNAE3_FEC_AUTO = 0,
HNAE3_FEC_BASER,
HNAE3_FEC_RS,
HNAE3_FEC_LLRS,
HNAE3_FEC_NONE,
HNAE3_FEC_USER_DEF,
};
enum hnae3_reset_notify_type {
HNAE3_UP_CLIENT,
HNAE3_DOWN_CLIENT,
HNAE3_INIT_CLIENT,
HNAE3_UNINIT_CLIENT,
};
enum hnae3_hw_error_type {
HNAE3_PPU_POISON_ERROR,
HNAE3_CMDQ_ECC_ERROR,
HNAE3_IMP_RD_POISON_ERROR,
HNAE3_ROCEE_AXI_RESP_ERROR,
};
enum hnae3_reset_type {
HNAE3_VF_RESET,
HNAE3_VF_FUNC_RESET,
HNAE3_VF_PF_FUNC_RESET,
HNAE3_VF_FULL_RESET,
HNAE3_FLR_RESET,
HNAE3_FUNC_RESET,
HNAE3_GLOBAL_RESET,
HNAE3_IMP_RESET,
HNAE3_NONE_RESET,
HNAE3_VF_EXP_RESET,
HNAE3_MAX_RESET,
};
enum hnae3_port_base_vlan_state {
HNAE3_PORT_BASE_VLAN_DISABLE,
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/dcbnl.h`, `linux/delay.h`, `linux/device.h`, `linux/ethtool.h`, `linux/module.h`, `linux/netdevice.h`, `linux/pci.h`.
- Detected declarations: `struct hnae3_handle`, `struct hnae3_queue`, `struct hns3_mac_stats`, `struct hnae3_vector_info`, `struct hnae3_ring_chain_node`, `struct hnae3_dev_specs`, `struct hnae3_client_ops`, `struct hnae3_client`, `struct hnae3_ae_dev`, `struct hnae3_ae_ops`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.