+extern void ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog);
+extern void ixgb_reset(struct ixgb_adapter *adapter);
+extern int ixgb_setup_rx_resources(struct ixgb_adapter *adapter);
+extern int ixgb_setup_tx_resources(struct ixgb_adapter *adapter);
+extern void ixgb_free_rx_resources(struct ixgb_adapter *adapter);
+extern void ixgb_free_tx_resources(struct ixgb_adapter *adapter);
+extern void ixgb_update_stats(struct ixgb_adapter *adapter);
+
+#define IXGB_ALL_RAR_ENTRIES 16
+
+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)},
+ {"tx_aborted_errors", IXGB_STAT(net_stats.tx_aborted_errors)},
+ {"tx_carrier_errors", IXGB_STAT(net_stats.tx_carrier_errors)},
+ {"tx_fifo_errors", IXGB_STAT(net_stats.tx_fifo_errors)},
+ {"tx_heartbeat_errors", IXGB_STAT(net_stats.tx_heartbeat_errors)},
+ {"tx_window_errors", IXGB_STAT(net_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)},
+#ifdef NETIF_F_TSO
+ {"tx_tcp_seg_good", IXGB_STAT(stats.tsctc)},
+ {"tx_tcp_seg_failed", IXGB_STAT(stats.tsctfc)},
+#endif
+ {"rx_flow_control_xon", IXGB_STAT(stats.xonrxc)},
+ {"rx_flow_control_xoff", IXGB_STAT(stats.xoffrxc)},
+ {"tx_flow_control_xon", IXGB_STAT(stats.xontxc)},
+ {"tx_flow_control_xoff", IXGB_STAT(stats.xofftxc)},
+ {"rx_csum_offload_good", IXGB_STAT(hw_csum_rx_good)},
+ {"rx_csum_offload_errors", IXGB_STAT(hw_csum_rx_error)},
+ {"tx_csum_offload_good", IXGB_STAT(hw_csum_tx_good)},
+ {"tx_csum_offload_errors", IXGB_STAT(hw_csum_tx_error)}
+};
+
+#define IXGB_STATS_LEN \
+ sizeof(ixgb_gstrings_stats) / sizeof(struct ixgb_stats)