Пример #1
0
	{"rx_packets", IXGB_NETDEV_STAT(stats.rx_packets)},
	{"tx_packets", IXGB_NETDEV_STAT(stats.tx_packets)},
	{"rx_bytes", IXGB_NETDEV_STAT(stats.rx_bytes)},
	{"tx_bytes", IXGB_NETDEV_STAT(stats.tx_bytes)},
	{"rx_errors", IXGB_NETDEV_STAT(stats.rx_errors)},
	{"tx_errors", IXGB_NETDEV_STAT(stats.tx_errors)},
	{"rx_dropped", IXGB_NETDEV_STAT(stats.rx_dropped)},
	{"tx_dropped", IXGB_NETDEV_STAT(stats.tx_dropped)},
	{"multicast", IXGB_NETDEV_STAT(stats.multicast)},
	{"collisions", IXGB_NETDEV_STAT(stats.collisions)},

/*	{ "rx_length_errors", IXGB_NETDEV_STAT(stats.rx_length_errors) },	*/
	{"rx_over_errors", IXGB_NETDEV_STAT(stats.rx_over_errors)},
	{"rx_crc_errors", IXGB_NETDEV_STAT(stats.rx_crc_errors)},
	{"rx_frame_errors", IXGB_NETDEV_STAT(stats.rx_frame_errors)},
	{"rx_no_buffer_count", IXGB_STAT(stats.rnbc)},
	{"rx_fifo_errors", IXGB_NETDEV_STAT(stats.rx_fifo_errors)},
	{"rx_missed_errors", IXGB_NETDEV_STAT(stats.rx_missed_errors)},
	{"tx_aborted_errors", IXGB_NETDEV_STAT(stats.tx_aborted_errors)},
	{"tx_carrier_errors", IXGB_NETDEV_STAT(stats.tx_carrier_errors)},
	{"tx_fifo_errors", IXGB_NETDEV_STAT(stats.tx_fifo_errors)},
	{"tx_heartbeat_errors", IXGB_NETDEV_STAT(stats.tx_heartbeat_errors)},
	{"tx_window_errors", IXGB_NETDEV_STAT(stats.tx_window_errors)},
	{"tx_deferred_ok", IXGB_STAT(stats.dc)},
	{"tx_timeout_count", IXGB_STAT(tx_timeout_count) },
	{"tx_restart_queue", IXGB_STAT(restart_queue) },
	{"rx_long_length_errors", IXGB_STAT(stats.roc)},
	{"rx_short_length_errors", IXGB_STAT(stats.ruc)},
	{"tx_tcp_seg_good", IXGB_STAT(stats.tsctc)},
	{"tx_tcp_seg_failed", IXGB_STAT(stats.tsctfc)},
	{"rx_flow_control_xon", IXGB_STAT(stats.xonrxc)},
Пример #2
0
extern char ixgb_driver_name[];
extern char ixgb_driver_version[];

extern int ixgb_up(struct ixgb_adapter *adapter);
extern void ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog);

struct ixgb_stats {
	char stat_string[ETH_GSTRING_LEN];
	int sizeof_stat;
	int stat_offset;
};

#define IXGB_STAT(m) sizeof(((struct ixgb_adapter *)0)->m), \
		      offsetof(struct ixgb_adapter, m)
static struct ixgb_stats ixgb_gstrings_stats[] = {
	{"rx_packets", IXGB_STAT(net_stats.rx_packets)},
	{"tx_packets", IXGB_STAT(net_stats.tx_packets)},
	{"rx_bytes", IXGB_STAT(net_stats.rx_bytes)},
	{"tx_bytes", IXGB_STAT(net_stats.tx_bytes)},
	{"rx_errors", IXGB_STAT(net_stats.rx_errors)},
	{"tx_errors", IXGB_STAT(net_stats.tx_errors)},
	{"rx_dropped", IXGB_STAT(net_stats.rx_dropped)},
	{"tx_dropped", IXGB_STAT(net_stats.tx_dropped)},
	{"multicast", IXGB_STAT(net_stats.multicast)},
	{"collisions", IXGB_STAT(net_stats.collisions)},
/*	{ "rx_length_errors", IXGB_STAT(net_stats.rx_length_errors) },	*/
	{"rx_over_errors", IXGB_STAT(net_stats.rx_over_errors)},
	{"rx_crc_errors", IXGB_STAT(net_stats.rx_crc_errors)},
	{"rx_frame_errors", IXGB_STAT(net_stats.rx_frame_errors)},
	{"rx_fifo_errors", IXGB_STAT(net_stats.rx_fifo_errors)},
	{"rx_missed_errors", IXGB_STAT(net_stats.rx_missed_errors)},