drivers/net/vmxnet3/vmxnet3_ethtool.c
Source file repositories/reference/linux-study-clean/drivers/net/vmxnet3/vmxnet3_ethtool.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/vmxnet3/vmxnet3_ethtool.c- Extension
.c- Size
- 42459 bytes
- Lines
- 1342
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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
vmxnet3_int.hnet/vxlan.hnet/geneve.hvmxnet3_xdp.h
Detected Declarations
struct vmxnet3_stat_descfunction vmxnet3_get_stats64function vmxnet3_get_sset_countfunction ethtoolfunction vmxnet3_get_drvinfofunction vmxnet3_get_stringsfunction vmxnet3_fix_featuresfunction vmxnet3_features_checkfunction vmxnet3_enable_encap_offloadsfunction vmxnet3_disable_encap_offloadsfunction vmxnet3_set_featuresfunction vmxnet3_get_ethtool_statsfunction ethtoolfunction vmxnet3_get_wolfunction vmxnet3_set_wolfunction vmxnet3_get_link_ksettingsfunction vmxnet3_get_ringparamfunction vmxnet3_set_ringparamfunction vmxnet3_get_rss_hash_optsfunction vmxnet3_set_rss_hash_optfunction vmxnet3_get_rx_ring_countfunction vmxnet3_get_rss_indir_sizefunction vmxnet3_get_rssfunction vmxnet3_set_rssfunction vmxnet3_get_coalescefunction vmxnet3_set_coalescefunction vmxnet3_get_channelsfunction vmxnet3_set_ethtool_ops
Annotated Snippet
struct vmxnet3_stat_desc {
char desc[ETH_GSTRING_LEN];
int offset;
};
/* per tq stats maintained by the device */
static const struct vmxnet3_stat_desc
vmxnet3_tq_dev_stats[] = {
/* description, offset */
{ "Tx Queue#", 0 },
{ " TSO pkts tx", offsetof(struct UPT1_TxStats, TSOPktsTxOK) },
{ " TSO bytes tx", offsetof(struct UPT1_TxStats, TSOBytesTxOK) },
{ " ucast pkts tx", offsetof(struct UPT1_TxStats, ucastPktsTxOK) },
{ " ucast bytes tx", offsetof(struct UPT1_TxStats, ucastBytesTxOK) },
{ " mcast pkts tx", offsetof(struct UPT1_TxStats, mcastPktsTxOK) },
{ " mcast bytes tx", offsetof(struct UPT1_TxStats, mcastBytesTxOK) },
{ " bcast pkts tx", offsetof(struct UPT1_TxStats, bcastPktsTxOK) },
{ " bcast bytes tx", offsetof(struct UPT1_TxStats, bcastBytesTxOK) },
{ " pkts tx err", offsetof(struct UPT1_TxStats, pktsTxError) },
{ " pkts tx discard", offsetof(struct UPT1_TxStats, pktsTxDiscard) },
};
/* per tq stats maintained by the driver */
static const struct vmxnet3_stat_desc
vmxnet3_tq_driver_stats[] = {
/* description, offset */
{" drv dropped tx total", offsetof(struct vmxnet3_tq_driver_stats,
drop_total) },
{ " too many frags", offsetof(struct vmxnet3_tq_driver_stats,
drop_too_many_frags) },
{ " giant hdr", offsetof(struct vmxnet3_tq_driver_stats,
drop_oversized_hdr) },
{ " hdr err", offsetof(struct vmxnet3_tq_driver_stats,
drop_hdr_inspect_err) },
{ " tso", offsetof(struct vmxnet3_tq_driver_stats,
drop_tso) },
{ " ring full", offsetof(struct vmxnet3_tq_driver_stats,
tx_ring_full) },
{ " pkts linearized", offsetof(struct vmxnet3_tq_driver_stats,
linearized) },
{ " hdr cloned", offsetof(struct vmxnet3_tq_driver_stats,
copy_skb_header) },
{ " giant hdr", offsetof(struct vmxnet3_tq_driver_stats,
oversized_hdr) },
{ " xdp xmit", offsetof(struct vmxnet3_tq_driver_stats,
xdp_xmit) },
{ " xdp xmit err", offsetof(struct vmxnet3_tq_driver_stats,
xdp_xmit_err) },
};
/* per rq stats maintained by the device */
static const struct vmxnet3_stat_desc
vmxnet3_rq_dev_stats[] = {
{ "Rx Queue#", 0 },
{ " LRO pkts rx", offsetof(struct UPT1_RxStats, LROPktsRxOK) },
{ " LRO byte rx", offsetof(struct UPT1_RxStats, LROBytesRxOK) },
{ " ucast pkts rx", offsetof(struct UPT1_RxStats, ucastPktsRxOK) },
{ " ucast bytes rx", offsetof(struct UPT1_RxStats, ucastBytesRxOK) },
{ " mcast pkts rx", offsetof(struct UPT1_RxStats, mcastPktsRxOK) },
{ " mcast bytes rx", offsetof(struct UPT1_RxStats, mcastBytesRxOK) },
{ " bcast pkts rx", offsetof(struct UPT1_RxStats, bcastPktsRxOK) },
{ " bcast bytes rx", offsetof(struct UPT1_RxStats, bcastBytesRxOK) },
{ " pkts rx OOB", offsetof(struct UPT1_RxStats, pktsRxOutOfBuf) },
{ " pkts rx err", offsetof(struct UPT1_RxStats, pktsRxError) },
};
/* per rq stats maintained by the driver */
static const struct vmxnet3_stat_desc
vmxnet3_rq_driver_stats[] = {
/* description, offset */
{ " drv dropped rx total", offsetof(struct vmxnet3_rq_driver_stats,
drop_total) },
{ " err", offsetof(struct vmxnet3_rq_driver_stats,
drop_err) },
{ " fcs", offsetof(struct vmxnet3_rq_driver_stats,
drop_fcs) },
{ " rx buf alloc fail", offsetof(struct vmxnet3_rq_driver_stats,
rx_buf_alloc_failure) },
{ " xdp packets", offsetof(struct vmxnet3_rq_driver_stats,
xdp_packets) },
{ " xdp tx", offsetof(struct vmxnet3_rq_driver_stats,
xdp_tx) },
{ " xdp redirects", offsetof(struct vmxnet3_rq_driver_stats,
xdp_redirects) },
{ " xdp drops", offsetof(struct vmxnet3_rq_driver_stats,
xdp_drops) },
{ " xdp aborted", offsetof(struct vmxnet3_rq_driver_stats,
xdp_aborted) },
};
Annotation
- Immediate include surface: `vmxnet3_int.h`, `net/vxlan.h`, `net/geneve.h`, `vmxnet3_xdp.h`.
- Detected declarations: `struct vmxnet3_stat_desc`, `function vmxnet3_get_stats64`, `function vmxnet3_get_sset_count`, `function ethtool`, `function vmxnet3_get_drvinfo`, `function vmxnet3_get_strings`, `function vmxnet3_fix_features`, `function vmxnet3_features_check`, `function vmxnet3_enable_encap_offloads`, `function vmxnet3_disable_encap_offloads`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- 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.