diff options
author | Netanel Belgazal <netanel@annapurnalabs.com> | 2017-02-09 15:21:32 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-09 22:27:06 -0500 |
commit | d81db24056132fe8b83e2fba337e9ea76675e68d (patch) | |
tree | 86c7227b467f50313292561b7412a2f8e608eb9d /drivers/net/ethernet/amazon/ena/ena_netdev.h | |
parent | net/ena: fix NULL dereference when removing the driver after device reset failed (diff) | |
download | linux-dev-d81db24056132fe8b83e2fba337e9ea76675e68d.tar.xz linux-dev-d81db24056132fe8b83e2fba337e9ea76675e68d.zip |
net/ena: refactor ena_get_stats64 to be atomic context safe
ndo_get_stat64() can be called from atomic context, but the current
implementation sends an admin command to retrieve the statistics from
the device. This admin command can sleep.
This patch re-factors the implementation of ena_get_stats64() to use
the {rx,tx}bytes/count from the driver's inner counters, and to obtain
the rx drop counter from the asynchronous keep alive (heart bit)
event.
Signed-off-by: Netanel Belgazal <netanel@annapurnalabs.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/amazon/ena/ena_netdev.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/ethernet/amazon/ena/ena_netdev.h index 69d7e9ed5bc8..f0ddc117d976 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.h +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.h @@ -241,6 +241,7 @@ struct ena_stats_dev { u64 interface_up; u64 interface_down; u64 admin_q_pause; + u64 rx_drops; }; enum ena_flags_t { |