brintos

brintos / linux-shallow public Read only

0
0
Text · 1.1 KiB · 3034890 Raw
41 lines · c
1#include <linux/ethtool.h>2 3#include "fbnic_csr.h"4 5struct fbnic_stat_counter {6	u64 value;7	union {8		u32 old_reg_value_32;9		u64 old_reg_value_64;10	} u;11	bool reported;12};13 14struct fbnic_eth_mac_stats {15	struct fbnic_stat_counter FramesTransmittedOK;16	struct fbnic_stat_counter FramesReceivedOK;17	struct fbnic_stat_counter FrameCheckSequenceErrors;18	struct fbnic_stat_counter AlignmentErrors;19	struct fbnic_stat_counter OctetsTransmittedOK;20	struct fbnic_stat_counter FramesLostDueToIntMACXmitError;21	struct fbnic_stat_counter OctetsReceivedOK;22	struct fbnic_stat_counter FramesLostDueToIntMACRcvError;23	struct fbnic_stat_counter MulticastFramesXmittedOK;24	struct fbnic_stat_counter BroadcastFramesXmittedOK;25	struct fbnic_stat_counter MulticastFramesReceivedOK;26	struct fbnic_stat_counter BroadcastFramesReceivedOK;27	struct fbnic_stat_counter FrameTooLongErrors;28};29 30struct fbnic_mac_stats {31	struct fbnic_eth_mac_stats eth_mac;32};33 34struct fbnic_hw_stats {35	struct fbnic_mac_stats mac;36};37 38u64 fbnic_stat_rd64(struct fbnic_dev *fbd, u32 reg, u32 offset);39 40void fbnic_get_hw_stats(struct fbnic_dev *fbd);41