Skip to content

Commit 0dcec68

Browse files
akiyanodavem330
authored andcommitted
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: Shay Agroskin <[email protected]> Signed-off-by: Arthur Kiyanovski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 79890d3 commit 0dcec68

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

drivers/net/ethernet/amazon/ena/ena_com.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,11 @@ struct ena_com_admin_sq {
230230
};
231231

232232
struct ena_com_stats_admin {
233-
u32 aborted_cmd;
234-
u32 submitted_cmd;
235-
u32 completed_cmd;
236-
u32 out_of_space;
237-
u32 no_completion;
233+
u64 aborted_cmd;
234+
u64 submitted_cmd;
235+
u64 completed_cmd;
236+
u64 out_of_space;
237+
u64 no_completion;
238238
};
239239

240240
struct ena_com_admin_queue {

drivers/net/ethernet/amazon/ena/ena_ethtool.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ static void ena_queue_stats(struct ena_adapter *adapter, u64 **data)
164164
static void ena_dev_admin_queue_stats(struct ena_adapter *adapter, u64 **data)
165165
{
166166
const struct ena_stats *ena_stats;
167-
u32 *ptr;
167+
u64 *ptr;
168168
int i;
169169

170170
for (i = 0; i < ENA_STATS_ARRAY_ENA_COM; i++) {
171171
ena_stats = &ena_stats_ena_com_strings[i];
172172

173-
ptr = (u32 *)((uintptr_t)&adapter->ena_dev->admin_queue.stats +
173+
ptr = (u64 *)((uintptr_t)&adapter->ena_dev->admin_queue.stats +
174174
(uintptr_t)ena_stats->stat_offset);
175175

176176
*(*data)++ = *ptr;

0 commit comments

Comments
 (0)