drivers/net/ethernet/pensando/ionic/ionic_stats.c

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/pensando/ionic/ionic_stats.c

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/pensando/ionic/ionic_stats.c
Extension
.c
Size
13499 bytes
Lines
432
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.

Dependency Surface

Detected Declarations

Annotated Snippet

// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2017 - 2019 Pensando Systems, Inc */

#include <linux/ethtool.h>
#include <linux/kernel.h>
#include <linux/mutex.h>
#include <linux/netdevice.h>

#include "ionic.h"
#include "ionic_lif.h"
#include "ionic_stats.h"

static const struct ionic_stat_desc ionic_lif_stats_desc[] = {
	IONIC_LIF_STAT_DESC(tx_packets),
	IONIC_LIF_STAT_DESC(tx_bytes),
	IONIC_LIF_STAT_DESC(rx_packets),
	IONIC_LIF_STAT_DESC(rx_bytes),
	IONIC_LIF_STAT_DESC(tx_tso),
	IONIC_LIF_STAT_DESC(tx_tso_bytes),
	IONIC_LIF_STAT_DESC(tx_csum_none),
	IONIC_LIF_STAT_DESC(tx_csum),
	IONIC_LIF_STAT_DESC(rx_csum_none),
	IONIC_LIF_STAT_DESC(rx_csum_complete),
	IONIC_LIF_STAT_DESC(rx_csum_error),
	IONIC_LIF_STAT_DESC(hw_tx_dropped),
	IONIC_LIF_STAT_DESC(hw_rx_dropped),
	IONIC_LIF_STAT_DESC(hw_rx_over_errors),
	IONIC_LIF_STAT_DESC(hw_rx_missed_errors),
	IONIC_LIF_STAT_DESC(hw_tx_aborted_errors),
	IONIC_LIF_STAT_DESC(xdp_drop),
	IONIC_LIF_STAT_DESC(xdp_aborted),
	IONIC_LIF_STAT_DESC(xdp_pass),
	IONIC_LIF_STAT_DESC(xdp_tx),
	IONIC_LIF_STAT_DESC(xdp_redirect),
	IONIC_LIF_STAT_DESC(xdp_frames),
};

static const struct ionic_stat_desc ionic_port_stats_desc[] = {
	IONIC_PORT_STAT_DESC(frames_rx_ok),
	IONIC_PORT_STAT_DESC(frames_rx_all),
	IONIC_PORT_STAT_DESC(frames_rx_bad_fcs),
	IONIC_PORT_STAT_DESC(frames_rx_bad_all),
	IONIC_PORT_STAT_DESC(octets_rx_ok),
	IONIC_PORT_STAT_DESC(octets_rx_all),
	IONIC_PORT_STAT_DESC(frames_rx_unicast),
	IONIC_PORT_STAT_DESC(frames_rx_multicast),
	IONIC_PORT_STAT_DESC(frames_rx_broadcast),
	IONIC_PORT_STAT_DESC(frames_rx_pause),
	IONIC_PORT_STAT_DESC(frames_rx_bad_length),
	IONIC_PORT_STAT_DESC(frames_rx_undersized),
	IONIC_PORT_STAT_DESC(frames_rx_oversized),
	IONIC_PORT_STAT_DESC(frames_rx_fragments),
	IONIC_PORT_STAT_DESC(frames_rx_jabber),
	IONIC_PORT_STAT_DESC(frames_rx_pripause),
	IONIC_PORT_STAT_DESC(frames_rx_stomped_crc),
	IONIC_PORT_STAT_DESC(frames_rx_too_long),
	IONIC_PORT_STAT_DESC(frames_rx_vlan_good),
	IONIC_PORT_STAT_DESC(frames_rx_dropped),
	IONIC_PORT_STAT_DESC(frames_rx_less_than_64b),
	IONIC_PORT_STAT_DESC(frames_rx_64b),
	IONIC_PORT_STAT_DESC(frames_rx_65b_127b),
	IONIC_PORT_STAT_DESC(frames_rx_128b_255b),
	IONIC_PORT_STAT_DESC(frames_rx_256b_511b),
	IONIC_PORT_STAT_DESC(frames_rx_512b_1023b),
	IONIC_PORT_STAT_DESC(frames_rx_1024b_1518b),
	IONIC_PORT_STAT_DESC(frames_rx_1519b_2047b),
	IONIC_PORT_STAT_DESC(frames_rx_2048b_4095b),
	IONIC_PORT_STAT_DESC(frames_rx_4096b_8191b),
	IONIC_PORT_STAT_DESC(frames_rx_8192b_9215b),
	IONIC_PORT_STAT_DESC(frames_rx_other),
	IONIC_PORT_STAT_DESC(frames_tx_ok),
	IONIC_PORT_STAT_DESC(frames_tx_all),
	IONIC_PORT_STAT_DESC(frames_tx_bad),
	IONIC_PORT_STAT_DESC(octets_tx_ok),
	IONIC_PORT_STAT_DESC(octets_tx_total),
	IONIC_PORT_STAT_DESC(frames_tx_unicast),
	IONIC_PORT_STAT_DESC(frames_tx_multicast),
	IONIC_PORT_STAT_DESC(frames_tx_broadcast),
	IONIC_PORT_STAT_DESC(frames_tx_pause),
	IONIC_PORT_STAT_DESC(frames_tx_pripause),
	IONIC_PORT_STAT_DESC(frames_tx_vlan),
	IONIC_PORT_STAT_DESC(frames_tx_less_than_64b),
	IONIC_PORT_STAT_DESC(frames_tx_64b),
	IONIC_PORT_STAT_DESC(frames_tx_65b_127b),
	IONIC_PORT_STAT_DESC(frames_tx_128b_255b),
	IONIC_PORT_STAT_DESC(frames_tx_256b_511b),
	IONIC_PORT_STAT_DESC(frames_tx_512b_1023b),
	IONIC_PORT_STAT_DESC(frames_tx_1024b_1518b),
	IONIC_PORT_STAT_DESC(frames_tx_1519b_2047b),
	IONIC_PORT_STAT_DESC(frames_tx_2048b_4095b),

Annotation

Implementation Notes