Commit 0dcec686 authored by Arthur Kiyanovski's avatar Arthur Kiyanovski Committed by David S. Miller

net: ena: cosmetic: change ena_com_stats_admin stats to u64

The size of the admin statistics in ena_com_stats_admin is changed
from 32bit to 64bit so to align with the sizes of the other statistics
in the driver (i.e. rx_stats, tx_stats and ena_stats_dev).

This is done as part of an effort to create a unified API to read
statistics.
Signed-off-by: default avatarShay Agroskin <shayagr@amazon.com>
Signed-off-by: default avatarArthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 79890d3f
...@@ -230,11 +230,11 @@ struct ena_com_admin_sq { ...@@ -230,11 +230,11 @@ struct ena_com_admin_sq {
}; };
struct ena_com_stats_admin { struct ena_com_stats_admin {
u32 aborted_cmd; u64 aborted_cmd;
u32 submitted_cmd; u64 submitted_cmd;
u32 completed_cmd; u64 completed_cmd;
u32 out_of_space; u64 out_of_space;
u32 no_completion; u64 no_completion;
}; };
struct ena_com_admin_queue { struct ena_com_admin_queue {
......
...@@ -164,13 +164,13 @@ static void ena_queue_stats(struct ena_adapter *adapter, u64 **data) ...@@ -164,13 +164,13 @@ static void ena_queue_stats(struct ena_adapter *adapter, u64 **data)
static void ena_dev_admin_queue_stats(struct ena_adapter *adapter, u64 **data) static void ena_dev_admin_queue_stats(struct ena_adapter *adapter, u64 **data)
{ {
const struct ena_stats *ena_stats; const struct ena_stats *ena_stats;
u32 *ptr; u64 *ptr;
int i; int i;
for (i = 0; i < ENA_STATS_ARRAY_ENA_COM; i++) { for (i = 0; i < ENA_STATS_ARRAY_ENA_COM; i++) {
ena_stats = &ena_stats_ena_com_strings[i]; ena_stats = &ena_stats_ena_com_strings[i];
ptr = (u32 *)((uintptr_t)&adapter->ena_dev->admin_queue.stats + ptr = (u64 *)((uintptr_t)&adapter->ena_dev->admin_queue.stats +
(uintptr_t)ena_stats->stat_offset); (uintptr_t)ena_stats->stat_offset);
*(*data)++ = *ptr; *(*data)++ = *ptr;
......
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