drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c- Extension
.c- Size
- 23575 bytes
- Lines
- 873
- 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/ethtool.hlinux/pci.hlinux/net_tstamp.hnic_reg.hnic.hnicvf_queues.hq_struct.hthunder_bgx.h../common/cavium_ptp.h
Detected Declarations
struct nicvf_statfunction nicvf_get_link_ksettingsfunction nicvf_get_linkfunction nicvf_get_drvinfofunction nicvf_get_msglevelfunction nicvf_set_msglevelfunction nicvf_get_qset_stringsfunction nicvf_get_stringsfunction nicvf_get_sset_countfunction nicvf_get_qset_statsfunction nicvf_get_ethtool_statsfunction nicvf_get_regs_lenfunction nicvf_get_regsfunction nicvf_get_coalescefunction nicvf_get_ringparamfunction nicvf_set_ringparamfunction nicvf_get_rxfh_fieldsfunction nicvf_get_rx_ring_countfunction nicvf_set_rxfh_fieldsfunction nicvf_get_rxfh_key_sizefunction nicvf_get_rxfh_indir_sizefunction nicvf_get_rxfhfunction nicvf_set_rxfhfunction nicvf_get_channelsfunction nicvf_set_channelsfunction nicvf_get_pauseparamfunction nicvf_set_pauseparamfunction nicvf_get_ts_infofunction nicvf_set_ethtool_ops
Annotated Snippet
struct nicvf_stat {
char name[ETH_GSTRING_LEN];
unsigned int index;
};
#define NICVF_HW_STAT(stat) { \
.name = #stat, \
.index = offsetof(struct nicvf_hw_stats, stat) / sizeof(u64), \
}
#define NICVF_DRV_STAT(stat) { \
.name = #stat, \
.index = offsetof(struct nicvf_drv_stats, stat) / sizeof(u64), \
}
static const struct nicvf_stat nicvf_hw_stats[] = {
NICVF_HW_STAT(rx_bytes),
NICVF_HW_STAT(rx_frames),
NICVF_HW_STAT(rx_ucast_frames),
NICVF_HW_STAT(rx_bcast_frames),
NICVF_HW_STAT(rx_mcast_frames),
NICVF_HW_STAT(rx_drops),
NICVF_HW_STAT(rx_drop_red),
NICVF_HW_STAT(rx_drop_red_bytes),
NICVF_HW_STAT(rx_drop_overrun),
NICVF_HW_STAT(rx_drop_overrun_bytes),
NICVF_HW_STAT(rx_drop_bcast),
NICVF_HW_STAT(rx_drop_mcast),
NICVF_HW_STAT(rx_drop_l3_bcast),
NICVF_HW_STAT(rx_drop_l3_mcast),
NICVF_HW_STAT(rx_fcs_errors),
NICVF_HW_STAT(rx_l2_errors),
NICVF_HW_STAT(tx_bytes),
NICVF_HW_STAT(tx_frames),
NICVF_HW_STAT(tx_ucast_frames),
NICVF_HW_STAT(tx_bcast_frames),
NICVF_HW_STAT(tx_mcast_frames),
NICVF_HW_STAT(tx_drops),
};
static const struct nicvf_stat nicvf_drv_stats[] = {
NICVF_DRV_STAT(rx_bgx_truncated_pkts),
NICVF_DRV_STAT(rx_jabber_errs),
NICVF_DRV_STAT(rx_fcs_errs),
NICVF_DRV_STAT(rx_bgx_errs),
NICVF_DRV_STAT(rx_prel2_errs),
NICVF_DRV_STAT(rx_l2_hdr_malformed),
NICVF_DRV_STAT(rx_oversize),
NICVF_DRV_STAT(rx_undersize),
NICVF_DRV_STAT(rx_l2_len_mismatch),
NICVF_DRV_STAT(rx_l2_pclp),
NICVF_DRV_STAT(rx_ip_ver_errs),
NICVF_DRV_STAT(rx_ip_csum_errs),
NICVF_DRV_STAT(rx_ip_hdr_malformed),
NICVF_DRV_STAT(rx_ip_payload_malformed),
NICVF_DRV_STAT(rx_ip_ttl_errs),
NICVF_DRV_STAT(rx_l3_pclp),
NICVF_DRV_STAT(rx_l4_malformed),
NICVF_DRV_STAT(rx_l4_csum_errs),
NICVF_DRV_STAT(rx_udp_len_errs),
NICVF_DRV_STAT(rx_l4_port_errs),
NICVF_DRV_STAT(rx_tcp_flag_errs),
NICVF_DRV_STAT(rx_tcp_offset_errs),
NICVF_DRV_STAT(rx_l4_pclp),
NICVF_DRV_STAT(rx_truncated_pkts),
NICVF_DRV_STAT(tx_desc_fault),
NICVF_DRV_STAT(tx_hdr_cons_err),
NICVF_DRV_STAT(tx_subdesc_err),
NICVF_DRV_STAT(tx_max_size_exceeded),
NICVF_DRV_STAT(tx_imm_size_oflow),
NICVF_DRV_STAT(tx_data_seq_err),
NICVF_DRV_STAT(tx_mem_seq_err),
NICVF_DRV_STAT(tx_lock_viol),
NICVF_DRV_STAT(tx_data_fault),
NICVF_DRV_STAT(tx_tstmp_conflict),
NICVF_DRV_STAT(tx_tstmp_timeout),
NICVF_DRV_STAT(tx_mem_fault),
NICVF_DRV_STAT(tx_csum_overlap),
NICVF_DRV_STAT(tx_csum_overflow),
NICVF_DRV_STAT(tx_tso),
NICVF_DRV_STAT(tx_timeout),
NICVF_DRV_STAT(txq_stop),
NICVF_DRV_STAT(txq_wake),
NICVF_DRV_STAT(rcv_buffer_alloc_failures),
NICVF_DRV_STAT(page_alloc),
};
static const struct nicvf_stat nicvf_queue_stats[] = {
Annotation
- Immediate include surface: `linux/ethtool.h`, `linux/pci.h`, `linux/net_tstamp.h`, `nic_reg.h`, `nic.h`, `nicvf_queues.h`, `q_struct.h`, `thunder_bgx.h`.
- Detected declarations: `struct nicvf_stat`, `function nicvf_get_link_ksettings`, `function nicvf_get_link`, `function nicvf_get_drvinfo`, `function nicvf_get_msglevel`, `function nicvf_set_msglevel`, `function nicvf_get_qset_strings`, `function nicvf_get_strings`, `function nicvf_get_sset_count`, `function nicvf_get_qset_stats`.
- 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.