diff options
author | Netanel Belgazal <netanel@amazon.com> | 2017-06-23 11:21:59 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-23 14:15:11 -0400 |
commit | 11a9a460199f35f6cbd9d65516a262060cba4fec (patch) | |
tree | 4f9d9a7ef750042ae35aa9342d4ccce96d8df639 /drivers/net | |
parent | 3ae5907c61587ed8327484bfdda87de0257ea73f (diff) | |
download | linux-11a9a460199f35f6cbd9d65516a262060cba4fec.tar.gz linux-11a9a460199f35f6cbd9d65516a262060cba4fec.tar.bz2 linux-11a9a460199f35f6cbd9d65516a262060cba4fec.zip |
net: ena: update driver's rx drop statistics
rx drop counter is reported by the device in the keep-alive
event.
update the driver's counter with the device counter.
Signed-off-by: Netanel Belgazal <netanel@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/amazon/ena/ena_netdev.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index 7dee448157bb..f7dc22f65d9f 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c @@ -3478,8 +3478,17 @@ static void ena_keep_alive_wd(void *adapter_data, struct ena_admin_aenq_entry *aenq_e) { struct ena_adapter *adapter = (struct ena_adapter *)adapter_data; + struct ena_admin_aenq_keep_alive_desc *desc; + u64 rx_drops; + desc = (struct ena_admin_aenq_keep_alive_desc *)aenq_e; adapter->last_keep_alive_jiffies = jiffies; + + rx_drops = ((u64)desc->rx_drops_high << 32) | desc->rx_drops_low; + + u64_stats_update_begin(&adapter->syncp); + adapter->dev_stats.rx_drops = rx_drops; + u64_stats_update_end(&adapter->syncp); } static void ena_notification(void *adapter_data, |