sfc: Replace stats_enabled flag with a disable count
Currently we use a spin-lock to serialise statistics fetches and also to inhibit them for short periods of time, plus a flag to enable/disable statistics fetches for longer periods of time, during online reset. This was apparently insufficient to deal with the several reasons for stats being disabled. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
af4ad9bca0
commit
1974cc205e
@@ -754,8 +754,7 @@ union efx_multicast_hash {
|
||||
* &struct net_device_stats.
|
||||
* @stats_buffer: DMA buffer for statistics
|
||||
* @stats_lock: Statistics update lock. Serialises statistics fetches
|
||||
* @stats_enabled: Temporarily disable statistics fetches.
|
||||
* Serialised by @stats_lock
|
||||
* @stats_disable_count: Nest count for disabling statistics fetches
|
||||
* @mac_op: MAC interface
|
||||
* @mac_address: Permanent MAC address
|
||||
* @phy_type: PHY type
|
||||
@@ -837,7 +836,7 @@ struct efx_nic {
|
||||
struct efx_mac_stats mac_stats;
|
||||
struct efx_buffer stats_buffer;
|
||||
spinlock_t stats_lock;
|
||||
bool stats_enabled;
|
||||
unsigned int stats_disable_count;
|
||||
|
||||
struct efx_mac_operations *mac_op;
|
||||
unsigned char mac_address[ETH_ALEN];
|
||||
|
Reference in New Issue
Block a user