Commit 11a9a460 authored by Netanel Belgazal's avatar Netanel Belgazal Committed by David S. Miller

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: default avatarNetanel Belgazal <netanel@amazon.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3ae5907c
...@@ -3478,8 +3478,17 @@ static void ena_keep_alive_wd(void *adapter_data, ...@@ -3478,8 +3478,17 @@ static void ena_keep_alive_wd(void *adapter_data,
struct ena_admin_aenq_entry *aenq_e) struct ena_admin_aenq_entry *aenq_e)
{ {
struct ena_adapter *adapter = (struct ena_adapter *)adapter_data; 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; 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, static void ena_notification(void *adapter_data,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment