aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/ef10.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/sfc/ef10.c')
-rw-r--r--drivers/net/ethernet/sfc/ef10.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index b5ed30a39144..002d4cdc319f 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -755,6 +755,8 @@ static int efx_ef10_reset(struct efx_nic *efx, enum reset_type reset_type)
755 { NULL, 64, 8 * MC_CMD_MAC_ ## mcdi_name } 755 { NULL, 64, 8 * MC_CMD_MAC_ ## mcdi_name }
756#define EF10_OTHER_STAT(ext_name) \ 756#define EF10_OTHER_STAT(ext_name) \
757 [EF10_STAT_ ## ext_name] = { #ext_name, 0, 0 } 757 [EF10_STAT_ ## ext_name] = { #ext_name, 0, 0 }
758#define GENERIC_SW_STAT(ext_name) \
759 [GENERIC_STAT_ ## ext_name] = { #ext_name, 0, 0 }
758 760
759static const struct efx_hw_stat_desc efx_ef10_stat_desc[EF10_STAT_COUNT] = { 761static const struct efx_hw_stat_desc efx_ef10_stat_desc[EF10_STAT_COUNT] = {
760 EF10_DMA_STAT(tx_bytes, TX_BYTES), 762 EF10_DMA_STAT(tx_bytes, TX_BYTES),
@@ -798,6 +800,8 @@ static const struct efx_hw_stat_desc efx_ef10_stat_desc[EF10_STAT_COUNT] = {
798 EF10_DMA_STAT(rx_align_error, RX_ALIGN_ERROR_PKTS), 800 EF10_DMA_STAT(rx_align_error, RX_ALIGN_ERROR_PKTS),
799 EF10_DMA_STAT(rx_length_error, RX_LENGTH_ERROR_PKTS), 801 EF10_DMA_STAT(rx_length_error, RX_LENGTH_ERROR_PKTS),
800 EF10_DMA_STAT(rx_nodesc_drops, RX_NODESC_DROPS), 802 EF10_DMA_STAT(rx_nodesc_drops, RX_NODESC_DROPS),
803 GENERIC_SW_STAT(rx_nodesc_trunc),
804 GENERIC_SW_STAT(rx_noskb_drops),
801 EF10_DMA_STAT(rx_pm_trunc_bb_overflow, PM_TRUNC_BB_OVERFLOW), 805 EF10_DMA_STAT(rx_pm_trunc_bb_overflow, PM_TRUNC_BB_OVERFLOW),
802 EF10_DMA_STAT(rx_pm_discard_bb_overflow, PM_DISCARD_BB_OVERFLOW), 806 EF10_DMA_STAT(rx_pm_discard_bb_overflow, PM_DISCARD_BB_OVERFLOW),
803 EF10_DMA_STAT(rx_pm_trunc_vfifo_full, PM_TRUNC_VFIFO_FULL), 807 EF10_DMA_STAT(rx_pm_trunc_vfifo_full, PM_TRUNC_VFIFO_FULL),
@@ -841,7 +845,9 @@ static const struct efx_hw_stat_desc efx_ef10_stat_desc[EF10_STAT_COUNT] = {
841 (1ULL << EF10_STAT_rx_gtjumbo) | \ 845 (1ULL << EF10_STAT_rx_gtjumbo) | \
842 (1ULL << EF10_STAT_rx_bad_gtjumbo) | \ 846 (1ULL << EF10_STAT_rx_bad_gtjumbo) | \
843 (1ULL << EF10_STAT_rx_overflow) | \ 847 (1ULL << EF10_STAT_rx_overflow) | \
844 (1ULL << EF10_STAT_rx_nodesc_drops)) 848 (1ULL << EF10_STAT_rx_nodesc_drops) | \
849 (1ULL << GENERIC_STAT_rx_nodesc_trunc) | \
850 (1ULL << GENERIC_STAT_rx_noskb_drops))
845 851
846/* These statistics are only provided by the 10G MAC. For a 10G/40G 852/* These statistics are only provided by the 10G MAC. For a 10G/40G
847 * switchable port we do not expose these because they might not 853 * switchable port we do not expose these because they might not
@@ -951,7 +957,7 @@ static int efx_ef10_try_update_nic_stats(struct efx_nic *efx)
951 stats[EF10_STAT_rx_bytes_minus_good_bytes]; 957 stats[EF10_STAT_rx_bytes_minus_good_bytes];
952 efx_update_diff_stat(&stats[EF10_STAT_rx_bad_bytes], 958 efx_update_diff_stat(&stats[EF10_STAT_rx_bad_bytes],
953 stats[EF10_STAT_rx_bytes_minus_good_bytes]); 959 stats[EF10_STAT_rx_bytes_minus_good_bytes]);
954 960 efx_update_sw_stats(efx, stats);
955 return 0; 961 return 0;
956} 962}
957 963
@@ -990,7 +996,9 @@ static size_t efx_ef10_update_stats(struct efx_nic *efx, u64 *full_stats,
990 core_stats->tx_packets = stats[EF10_STAT_tx_packets]; 996 core_stats->tx_packets = stats[EF10_STAT_tx_packets];
991 core_stats->rx_bytes = stats[EF10_STAT_rx_bytes]; 997 core_stats->rx_bytes = stats[EF10_STAT_rx_bytes];
992 core_stats->tx_bytes = stats[EF10_STAT_tx_bytes]; 998 core_stats->tx_bytes = stats[EF10_STAT_tx_bytes];
993 core_stats->rx_dropped = stats[EF10_STAT_rx_nodesc_drops]; 999 core_stats->rx_dropped = stats[EF10_STAT_rx_nodesc_drops] +
1000 stats[GENERIC_STAT_rx_nodesc_trunc] +
1001 stats[GENERIC_STAT_rx_noskb_drops];
994 core_stats->multicast = stats[EF10_STAT_rx_multicast]; 1002 core_stats->multicast = stats[EF10_STAT_rx_multicast];
995 core_stats->rx_length_errors = 1003 core_stats->rx_length_errors =
996 stats[EF10_STAT_rx_gtjumbo] + 1004 stats[EF10_STAT_rx_gtjumbo] +