drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.h
Extension
.h
Size
4621 bytes
Lines
165
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

struct fbnic_stat_counter {
	u64 value;
	union {
		u32 old_reg_value_32;
		u64 old_reg_value_64;
	} u;
	bool reported;
};

struct fbnic_hw_stat {
	struct fbnic_stat_counter frames;
	struct fbnic_stat_counter bytes;
};

struct fbnic_fec_stats {
	struct fbnic_stat_counter corrected_blocks, uncorrectable_blocks;
};

struct fbnic_pcs_stats {
	struct {
		struct fbnic_stat_counter lanes[FBNIC_PCS_MAX_LANES];
	} SymbolErrorDuringCarrier;
};

/* Note: not updated by fbnic_get_hw_stats() */
struct fbnic_eth_ctrl_stats {
	struct fbnic_stat_counter MACControlFramesTransmitted;
	struct fbnic_stat_counter MACControlFramesReceived;
};

/* Note: not updated by fbnic_get_hw_stats() */
struct fbnic_rmon_stats {
	struct fbnic_stat_counter undersize_pkts;
	struct fbnic_stat_counter oversize_pkts;
	struct fbnic_stat_counter fragments;
	struct fbnic_stat_counter jabbers;

	struct fbnic_stat_counter hist[ETHTOOL_RMON_HIST_MAX];
	struct fbnic_stat_counter hist_tx[ETHTOOL_RMON_HIST_MAX];
};

/* Note: not updated by fbnic_get_hw_stats() */
struct fbnic_pause_stats {
	struct fbnic_stat_counter tx_pause_frames;
	struct fbnic_stat_counter rx_pause_frames;
	struct fbnic_stat_counter tx_pause_storm_events;
};

struct fbnic_eth_mac_stats {
	struct fbnic_stat_counter FramesTransmittedOK;
	struct fbnic_stat_counter FramesReceivedOK;
	struct fbnic_stat_counter FrameCheckSequenceErrors;
	struct fbnic_stat_counter AlignmentErrors;
	struct fbnic_stat_counter OctetsTransmittedOK;
	struct fbnic_stat_counter FramesLostDueToIntMACXmitError;
	struct fbnic_stat_counter OctetsReceivedOK;
	struct fbnic_stat_counter FramesLostDueToIntMACRcvError;
	struct fbnic_stat_counter MulticastFramesXmittedOK;
	struct fbnic_stat_counter BroadcastFramesXmittedOK;
	struct fbnic_stat_counter MulticastFramesReceivedOK;
	struct fbnic_stat_counter BroadcastFramesReceivedOK;
	struct fbnic_stat_counter FrameTooLongErrors;
};

struct fbnic_phy_stats {
	struct fbnic_fec_stats fec;
	struct fbnic_pcs_stats pcs;
};

struct fbnic_mac_stats {
	struct fbnic_eth_mac_stats eth_mac;
	struct fbnic_pause_stats pause;
	struct fbnic_eth_ctrl_stats eth_ctrl;
	struct fbnic_rmon_stats rmon;
};

struct fbnic_tmi_stats {
	struct fbnic_hw_stat drop;
	struct fbnic_stat_counter ptp_illegal_req, ptp_good_ts, ptp_bad_ts;
};

struct fbnic_tti_stats {
	struct fbnic_hw_stat cm_drop, frame_drop, tbi_drop;
};

struct fbnic_rpc_stats {
	struct fbnic_stat_counter unkn_etype, unkn_ext_hdr;
	struct fbnic_stat_counter ipv4_frag, ipv6_frag, ipv4_esp, ipv6_esp;
	struct fbnic_stat_counter tcp_opt_err, out_of_hdr_err, ovr_size_err;
};

Annotation

Implementation Notes