drivers/net/ethernet/emulex/benet/be_ethtool.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/emulex/benet/be_ethtool.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/emulex/benet/be_ethtool.c- Extension
.c- Size
- 40193 bytes
- Lines
- 1450
- 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
be.hbe_cmds.hlinux/ethtool.h
Detected Declarations
struct be_ethtool_statfunction be_get_drvinfofunction lancer_cmd_get_file_lenfunction be_get_dump_lenfunction lancer_cmd_read_filefunction be_read_dump_datafunction be_get_coalescefunction be_set_coalescefunction for_all_evt_queuesfunction be_get_ethtool_statsfunction for_all_rx_queuesfunction for_all_tx_queuesfunction be_get_stat_stringsfunction be_get_sset_countfunction be_get_port_typefunction convert_to_et_settingfunction be_pause_supportedfunction be_get_link_ksettingsfunction be_get_ringparamfunction be_get_pauseparamfunction be_set_pauseparamfunction be_set_phys_idfunction be_set_dumpfunction be_get_wolfunction be_set_wolfunction be_test_ddr_dmafunction be_loopback_testfunction be_self_testfunction be_do_flashfunction be_get_dump_flagfunction be_get_dump_datafunction be_get_eeprom_lenfunction be_read_eepromfunction be_get_msg_levelfunction be_set_msg_levelfunction be_get_rx_ring_countfunction be_get_rxfh_fieldsfunction be_set_rxfh_fieldsfunction be_get_channelsfunction be_set_channelsfunction be_get_rxfh_indir_sizefunction be_get_rxfh_key_sizefunction be_get_rxfhfunction be_set_rxfhfunction be_get_module_infofunction be_get_module_eepromfunction be_get_priv_flagsfunction be_set_priv_flags
Annotated Snippet
struct be_ethtool_stat {
char desc[ETH_GSTRING_LEN];
int type;
int size;
int offset;
};
enum {DRVSTAT_TX, DRVSTAT_RX, DRVSTAT};
#define FIELDINFO(_struct, field) sizeof_field(_struct, field), \
offsetof(_struct, field)
#define DRVSTAT_TX_INFO(field) #field, DRVSTAT_TX,\
FIELDINFO(struct be_tx_stats, field)
#define DRVSTAT_RX_INFO(field) #field, DRVSTAT_RX,\
FIELDINFO(struct be_rx_stats, field)
#define DRVSTAT_INFO(field) #field, DRVSTAT,\
FIELDINFO(struct be_drv_stats, field)
static const struct be_ethtool_stat et_stats[] = {
{DRVSTAT_INFO(rx_crc_errors)},
{DRVSTAT_INFO(rx_alignment_symbol_errors)},
{DRVSTAT_INFO(rx_pause_frames)},
{DRVSTAT_INFO(rx_control_frames)},
/* Received packets dropped when the Ethernet length field
* is not equal to the actual Ethernet data length.
*/
{DRVSTAT_INFO(rx_in_range_errors)},
/* Received packets dropped when their length field is >= 1501 bytes
* and <= 1535 bytes.
*/
{DRVSTAT_INFO(rx_out_range_errors)},
/* Received packets dropped when they are longer than 9216 bytes */
{DRVSTAT_INFO(rx_frame_too_long)},
/* Received packets dropped when they don't pass the unicast or
* multicast address filtering.
*/
{DRVSTAT_INFO(rx_address_filtered)},
/* Received packets dropped when IP packet length field is less than
* the IP header length field.
*/
{DRVSTAT_INFO(rx_dropped_too_small)},
/* Received packets dropped when IP length field is greater than
* the actual packet length.
*/
{DRVSTAT_INFO(rx_dropped_too_short)},
/* Received packets dropped when the IP header length field is less
* than 5.
*/
{DRVSTAT_INFO(rx_dropped_header_too_small)},
/* Received packets dropped when the TCP header length field is less
* than 5 or the TCP header length + IP header length is more
* than IP packet length.
*/
{DRVSTAT_INFO(rx_dropped_tcp_length)},
{DRVSTAT_INFO(rx_dropped_runt)},
/* Number of received packets dropped when a fifo for descriptors going
* into the packet demux block overflows. In normal operation, this
* fifo must never overflow.
*/
{DRVSTAT_INFO(rxpp_fifo_overflow_drop)},
/* Received packets dropped when the RX block runs out of space in
* one of its input FIFOs. This could happen due a long burst of
* minimum-sized (64b) frames in the receive path.
* This counter may also be erroneously incremented rarely.
*/
{DRVSTAT_INFO(rx_input_fifo_overflow_drop)},
{DRVSTAT_INFO(rx_ip_checksum_errs)},
{DRVSTAT_INFO(rx_tcp_checksum_errs)},
{DRVSTAT_INFO(rx_udp_checksum_errs)},
{DRVSTAT_INFO(tx_pauseframes)},
{DRVSTAT_INFO(tx_controlframes)},
{DRVSTAT_INFO(rx_priority_pause_frames)},
{DRVSTAT_INFO(tx_priority_pauseframes)},
/* Received packets dropped when an internal fifo going into
* main packet buffer tank (PMEM) overflows.
*/
{DRVSTAT_INFO(pmem_fifo_overflow_drop)},
{DRVSTAT_INFO(jabber_events)},
/* Received packets dropped due to lack of available HW packet buffers
* used to temporarily hold the received packets.
*/
{DRVSTAT_INFO(rx_drops_no_pbuf)},
/* Received packets dropped due to input receive buffer
* descriptor fifo overflowing.
*/
{DRVSTAT_INFO(rx_drops_no_erx_descr)},
/* Packets dropped because the internal FIFO to the offloaded TCP
* receive processing block is full. This could happen only for
* offloaded iSCSI or FCoE trarffic.
*/
{DRVSTAT_INFO(rx_drops_no_tpre_descr)},
Annotation
- Immediate include surface: `be.h`, `be_cmds.h`, `linux/ethtool.h`.
- Detected declarations: `struct be_ethtool_stat`, `function be_get_drvinfo`, `function lancer_cmd_get_file_len`, `function be_get_dump_len`, `function lancer_cmd_read_file`, `function be_read_dump_data`, `function be_get_coalesce`, `function be_set_coalesce`, `function for_all_evt_queues`, `function be_get_ethtool_stats`.
- 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.