sfc: add extra RX drop counters for nodesc_trunc and noskb_drop
Added a counter rx_noskb_drop for failure to allocate an skb. Summed the per-channel rx_nodesc_trunc counters earlier so that they can be included in rx_dropped. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
d762d03849
commit
e4d112e4f9
@@ -424,6 +424,8 @@ static void siena_remove_nic(struct efx_nic *efx)
|
||||
{ #ext_name, 64, 8 * MC_CMD_MAC_ ## mcdi_name }
|
||||
#define SIENA_OTHER_STAT(ext_name) \
|
||||
[SIENA_STAT_ ## ext_name] = { #ext_name, 0, 0 }
|
||||
#define GENERIC_SW_STAT(ext_name) \
|
||||
[GENERIC_STAT_ ## ext_name] = { #ext_name, 0, 0 }
|
||||
|
||||
static const struct efx_hw_stat_desc siena_stat_desc[SIENA_STAT_COUNT] = {
|
||||
SIENA_DMA_STAT(tx_bytes, TX_BYTES),
|
||||
@@ -483,6 +485,8 @@ static const struct efx_hw_stat_desc siena_stat_desc[SIENA_STAT_COUNT] = {
|
||||
SIENA_DMA_STAT(rx_length_error, RX_LENGTH_ERROR_PKTS),
|
||||
SIENA_DMA_STAT(rx_internal_error, RX_INTERNAL_ERROR_PKTS),
|
||||
SIENA_DMA_STAT(rx_nodesc_drop_cnt, RX_NODESC_DROPS),
|
||||
GENERIC_SW_STAT(rx_nodesc_trunc),
|
||||
GENERIC_SW_STAT(rx_noskb_drops),
|
||||
};
|
||||
static const unsigned long siena_stat_mask[] = {
|
||||
[0 ... BITS_TO_LONGS(SIENA_STAT_COUNT) - 1] = ~0UL,
|
||||
@@ -528,6 +532,7 @@ static int siena_try_update_nic_stats(struct efx_nic *efx)
|
||||
efx_update_diff_stat(&stats[SIENA_STAT_rx_good_bytes],
|
||||
stats[SIENA_STAT_rx_bytes] -
|
||||
stats[SIENA_STAT_rx_bad_bytes]);
|
||||
efx_update_sw_stats(efx, stats);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -554,7 +559,9 @@ static size_t siena_update_nic_stats(struct efx_nic *efx, u64 *full_stats,
|
||||
core_stats->tx_packets = stats[SIENA_STAT_tx_packets];
|
||||
core_stats->rx_bytes = stats[SIENA_STAT_rx_bytes];
|
||||
core_stats->tx_bytes = stats[SIENA_STAT_tx_bytes];
|
||||
core_stats->rx_dropped = stats[SIENA_STAT_rx_nodesc_drop_cnt];
|
||||
core_stats->rx_dropped = stats[SIENA_STAT_rx_nodesc_drop_cnt] +
|
||||
stats[GENERIC_STAT_rx_nodesc_trunc] +
|
||||
stats[GENERIC_STAT_rx_noskb_drops];
|
||||
core_stats->multicast = stats[SIENA_STAT_rx_multicast];
|
||||
core_stats->collisions = stats[SIENA_STAT_tx_collision];
|
||||
core_stats->rx_length_errors =
|
||||
|
||||
Reference in New Issue
Block a user