aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/nic.h
diff options
context:
space:
mode:
authorJon Cooper <jcooper@solarflare.com>2013-09-30 17:36:50 +0100
committerBen Hutchings <bhutchings@solarflare.com>2013-12-12 22:06:51 +0000
commitf8f3b5ae3ea45ef6b00b471fed0fc90552a3c4af (patch)
treee65cedae54bb32528176a2d31890ee86cd6db62d /drivers/net/ethernet/sfc/nic.h
parentsfc: Make initial fill of RX descriptors synchronous (diff)
downloadlinux-dev-f8f3b5ae3ea45ef6b00b471fed0fc90552a3c4af.tar.xz
linux-dev-f8f3b5ae3ea45ef6b00b471fed0fc90552a3c4af.zip
sfc: Correct RX dropped count for drops while interface is down
We don't directly control RX ingress on Siena or any later controllers, and so we cannot prevent packets from entering the RX datapath while the RX queues are not set up. This results in the hardware incrementing RX_NODESC_DROP_CNT, but it's not an error and we should not include it in error stats. When bringing an interface up or down, pull (or wait for) stats and count the number of packets that were dropped while the interface was down. Subtract this from the reported RX dropped count. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/nic.h')
-rw-r--r--drivers/net/ethernet/sfc/nic.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/nic.h b/drivers/net/ethernet/sfc/nic.h
index fe71e81ee8bf..7ac9c000696f 100644
--- a/drivers/net/ethernet/sfc/nic.h
+++ b/drivers/net/ethernet/sfc/nic.h
@@ -775,6 +775,7 @@ size_t efx_nic_describe_stats(const struct efx_hw_stat_desc *desc, size_t count,
void efx_nic_update_stats(const struct efx_hw_stat_desc *desc, size_t count,
const unsigned long *mask, u64 *stats,
const void *dma_buf, bool accumulate);
+void efx_nic_fix_nodesc_drop_stat(struct efx_nic *efx, u64 *stat);
#define EFX_MAX_FLUSH_TIME 5000