drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c- Extension
.c- Size
- 91584 bytes
- Lines
- 3184
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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/ethtool.hlinux/netdevice.hlinux/net_tstamp.hlinux/pci.hliquidio_common.hocteon_droq.hocteon_iq.hresponse_manager.hocteon_device.hocteon_nic.hocteon_main.hocteon_network.hcn66xx_regs.hcn66xx_device.hcn23xx_pf_device.hcn23xx_vf_device.h
Detected Declarations
struct oct_intrmod_respstruct oct_mdio_cmd_respfunction lio_get_link_ksettingsfunction lio_set_link_ksettingsfunction lio_get_drvinfofunction lio_get_vf_drvinfofunction lio_send_queue_count_updatefunction lio_ethtool_get_channelsfunction lio_irq_reallocate_irqsfunction lio_ethtool_set_channelsfunction lio_get_eeprom_lenfunction lio_get_eepromfunction octnet_gpio_accessfunction octnet_id_activefunction octnet_mdio45_accessfunction lio_set_phys_idfunction lio_ethtool_get_ringparamfunction lio_23xx_reconfigure_queue_countfunction lio_reset_queuesfunction lio_ethtool_set_ringparamfunction lio_get_msglevelfunction lio_set_msglevelfunction lio_vf_set_msglevelfunction lio_get_pauseparamfunction lio_set_pauseparamfunction lio_get_ethtool_statsfunction lio_vf_get_ethtool_statsfunction lio_get_priv_flags_stringsfunction lio_get_stringsfunction lio_vf_get_stringsfunction lio_get_priv_flags_ss_countfunction lio_get_sset_countfunction lio_vf_get_sset_countfunction octnet_get_intrmod_cfgfunction octnet_set_intrmod_cfgfunction lio_get_intr_coalescefunction oct_cfg_adaptive_intrfunction oct_cfg_rx_intrcntfunction oct_cfg_rx_intrtimefunction oct_cfg_tx_intrcntfunction lio_set_intr_coalescefunction lio_get_ts_infofunction lio_get_regs_lenfunction cn23xx_read_csr_regfunction cn23xx_vf_read_csr_regfunction cn6xxx_read_csr_regfunction cn6xxx_read_config_regfunction lio_get_regs
Annotated Snippet
struct oct_intrmod_resp {
u64 rh;
struct oct_intrmod_cfg intrmod;
u64 status;
};
struct oct_mdio_cmd_resp {
u64 rh;
struct oct_mdio_cmd resp;
u64 status;
};
#define OCT_MDIO45_RESP_SIZE (sizeof(struct oct_mdio_cmd_resp))
/* Octeon's interface mode of operation */
enum {
INTERFACE_MODE_DISABLED,
INTERFACE_MODE_RGMII,
INTERFACE_MODE_GMII,
INTERFACE_MODE_SPI,
INTERFACE_MODE_PCIE,
INTERFACE_MODE_XAUI,
INTERFACE_MODE_SGMII,
INTERFACE_MODE_PICMG,
INTERFACE_MODE_NPI,
INTERFACE_MODE_LOOP,
INTERFACE_MODE_SRIO,
INTERFACE_MODE_ILK,
INTERFACE_MODE_RXAUI,
INTERFACE_MODE_QSGMII,
INTERFACE_MODE_AGL,
INTERFACE_MODE_XLAUI,
INTERFACE_MODE_XFI,
INTERFACE_MODE_10G_KR,
INTERFACE_MODE_40G_KR4,
INTERFACE_MODE_MIXED,
};
#define OCT_ETHTOOL_REGDUMP_LEN 4096
#define OCT_ETHTOOL_REGDUMP_LEN_23XX (4096 * 11)
#define OCT_ETHTOOL_REGDUMP_LEN_23XX_VF (4096 * 2)
#define OCT_ETHTOOL_REGSVER 1
/* statistics of PF */
static const char oct_stats_strings[][ETH_GSTRING_LEN] = {
"rx_packets",
"tx_packets",
"rx_bytes",
"tx_bytes",
"rx_errors",
"tx_errors",
"rx_dropped",
"tx_dropped",
"tx_total_sent",
"tx_total_fwd",
"tx_err_pko",
"tx_err_pki",
"tx_err_link",
"tx_err_drop",
"tx_tso",
"tx_tso_packets",
"tx_tso_err",
"tx_vxlan",
"tx_mcast",
"tx_bcast",
"mac_tx_total_pkts",
"mac_tx_total_bytes",
"mac_tx_mcast_pkts",
"mac_tx_bcast_pkts",
"mac_tx_ctl_packets",
"mac_tx_total_collisions",
"mac_tx_one_collision",
"mac_tx_multi_collision",
"mac_tx_max_collision_fail",
"mac_tx_max_deferral_fail",
"mac_tx_fifo_err",
"mac_tx_runts",
"rx_total_rcvd",
"rx_total_fwd",
"rx_mcast",
"rx_bcast",
"rx_jabber_err",
"rx_l2_err",
"rx_frame_err",
"rx_err_pko",
Annotation
- Immediate include surface: `linux/ethtool.h`, `linux/netdevice.h`, `linux/net_tstamp.h`, `linux/pci.h`, `liquidio_common.h`, `octeon_droq.h`, `octeon_iq.h`, `response_manager.h`.
- Detected declarations: `struct oct_intrmod_resp`, `struct oct_mdio_cmd_resp`, `function lio_get_link_ksettings`, `function lio_set_link_ksettings`, `function lio_get_drvinfo`, `function lio_get_vf_drvinfo`, `function lio_send_queue_count_update`, `function lio_ethtool_get_channels`, `function lio_irq_reallocate_irqs`, `function lio_ethtool_set_channels`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration 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.