drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h- Extension
.h- Size
- 20020 bytes
- Lines
- 896
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/io.hlinux/etherdevice.hhnae3.hhclge_comm_cmd.h
Detected Declarations
struct hclge_devstruct hclge_misc_vectorstruct hclge_config_rcb_init_cmdstruct hclge_tqp_map_cmdstruct hclge_ctrl_vector_chain_cmdstruct hclge_tx_buff_alloc_cmdstruct hclge_rx_priv_buff_cmdstruct hclge_priv_wlstruct hclge_rx_priv_wl_bufstruct hclge_rx_com_thrdstruct hclge_rx_com_wlstruct hclge_waterlinestruct hclge_tc_thrdstruct hclge_priv_bufstruct hclge_shared_bufstruct hclge_pkt_buf_allocstruct hclge_rx_com_wl_buf_cmdstruct hclge_rx_pkt_buf_cmdstruct hclge_func_status_cmdstruct hclge_pf_res_cmdstruct hclge_cfg_param_cmdstruct hclge_vf_num_cmdstruct hclge_link_status_cmdstruct hclge_promisc_cfg_cmdstruct hclge_config_mac_mode_cmdstruct hclge_pf_rst_sync_cmdstruct hclge_config_mac_speed_dup_cmdstruct hclge_config_auto_neg_cmdstruct hclge_sfp_info_cmdstruct hclge_config_fec_cmdstruct hclge_query_fec_stats_cmdstruct hclge_config_max_frm_size_cmdstruct hclge_mac_vlan_tbl_entry_cmdstruct hclge_umv_spc_alc_cmdstruct hclge_mac_mgr_tbl_entry_cmdstruct hclge_vlan_filter_ctrl_cmdstruct hclge_vlan_filter_pf_cfg_cmdstruct hclge_vlan_filter_vf_cfg_cmdstruct hclge_port_vlan_filter_bypass_cmdstruct hclge_mac_vlan_switch_cmdstruct hclge_vport_vtag_tx_cfg_cmdstruct hclge_vport_vtag_rx_cfg_cmdstruct hclge_tx_vlan_type_cfg_cmdstruct hclge_rx_vlan_type_cfg_cmdstruct hclge_cfg_com_tqp_queue_cmdstruct hclge_cfg_tx_queue_pointer_cmdstruct hclge_mac_ethertype_idx_rd_cmdstruct hclge_cfg_tso_status_cmd
Annotated Snippet
struct hclge_misc_vector {
u8 __iomem *addr;
int vector_irq;
char name[HNAE3_INT_NAME_LEN];
};
#define hclge_cmd_setup_basic_desc(desc, opcode, is_read) \
hclge_comm_cmd_setup_basic_desc(desc, opcode, is_read)
#define HCLGE_TQP_REG_OFFSET 0x80000
#define HCLGE_TQP_REG_SIZE 0x200
#define HCLGE_FD_COUNTER_MAX_SIZE_DEV_V2 128
#define HCLGE_TQP_MAX_SIZE_DEV_V2 1024
#define HCLGE_TQP_EXT_REG_OFFSET 0x100
#define HCLGE_RCB_INIT_QUERY_TIMEOUT 10
#define HCLGE_RCB_INIT_FLAG_EN_B 0
#define HCLGE_RCB_INIT_FLAG_FINI_B 8
struct hclge_config_rcb_init_cmd {
__le16 rcb_init_flag;
u8 rsv[22];
};
struct hclge_tqp_map_cmd {
__le16 tqp_id; /* Absolute tqp id for in this pf */
u8 tqp_vf; /* VF id */
#define HCLGE_TQP_MAP_TYPE_PF 0
#define HCLGE_TQP_MAP_TYPE_VF 1
#define HCLGE_TQP_MAP_TYPE_B 0
#define HCLGE_TQP_MAP_EN_B 1
u8 tqp_flag; /* Indicate it's pf or vf tqp */
__le16 tqp_vid; /* Virtual id in this pf/vf */
u8 rsv[18];
};
#define HCLGE_VECTOR_ELEMENTS_PER_CMD 10
enum hclge_int_type {
HCLGE_INT_TX,
HCLGE_INT_RX,
HCLGE_INT_EVENT,
};
struct hclge_ctrl_vector_chain_cmd {
#define HCLGE_VECTOR_ID_L_S 0
#define HCLGE_VECTOR_ID_L_M GENMASK(7, 0)
u8 int_vector_id_l;
u8 int_cause_num;
#define HCLGE_INT_TYPE_S 0
#define HCLGE_INT_TYPE_M GENMASK(1, 0)
#define HCLGE_TQP_ID_S 2
#define HCLGE_TQP_ID_M GENMASK(12, 2)
#define HCLGE_INT_GL_IDX_S 13
#define HCLGE_INT_GL_IDX_M GENMASK(14, 13)
__le16 tqp_type_and_id[HCLGE_VECTOR_ELEMENTS_PER_CMD];
u8 vfid;
#define HCLGE_VECTOR_ID_H_S 8
#define HCLGE_VECTOR_ID_H_M GENMASK(15, 8)
u8 int_vector_id_h;
};
#define HCLGE_MAX_TC_NUM 8
#define HCLGE_TC0_PRI_BUF_EN_B 15 /* Bit 15 indicate enable or not */
#define HCLGE_BUF_UNIT_S 7 /* Buf size is united by 128 bytes */
struct hclge_tx_buff_alloc_cmd {
__le16 tx_pkt_buff[HCLGE_MAX_TC_NUM];
u8 tx_buff_rsv[8];
};
struct hclge_rx_priv_buff_cmd {
__le16 buf_num[HCLGE_MAX_TC_NUM];
__le16 shared_buf;
u8 rsv[6];
};
#define HCLGE_RX_PRIV_EN_B 15
#define HCLGE_TC_NUM_ONE_DESC 4
struct hclge_priv_wl {
__le16 high;
__le16 low;
};
struct hclge_rx_priv_wl_buf {
struct hclge_priv_wl tc_wl[HCLGE_TC_NUM_ONE_DESC];
};
struct hclge_rx_com_thrd {
struct hclge_priv_wl com_thrd[HCLGE_TC_NUM_ONE_DESC];
};
Annotation
- Immediate include surface: `linux/types.h`, `linux/io.h`, `linux/etherdevice.h`, `hnae3.h`, `hclge_comm_cmd.h`.
- Detected declarations: `struct hclge_dev`, `struct hclge_misc_vector`, `struct hclge_config_rcb_init_cmd`, `struct hclge_tqp_map_cmd`, `struct hclge_ctrl_vector_chain_cmd`, `struct hclge_tx_buff_alloc_cmd`, `struct hclge_rx_priv_buff_cmd`, `struct hclge_priv_wl`, `struct hclge_rx_priv_wl_buf`, `struct hclge_rx_com_thrd`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.