Skip to content

Commit d4a8b3b

Browse files
Sameeh Jubrandavem330
authored andcommitted
net: ena: add unmask interrupts statistics to ethtool
Add unmask interrupts statistics to ethtool. Signed-off-by: Netanel Belgazal <[email protected]> Signed-off-by: Arthur Kiyanovski <[email protected]> Signed-off-by: Sameeh Jubran <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent cac7172 commit d4a8b3b

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ static const struct ena_stats ena_stats_tx_strings[] = {
8383
ENA_STAT_TX_ENTRY(bad_req_id),
8484
ENA_STAT_TX_ENTRY(llq_buffer_copy),
8585
ENA_STAT_TX_ENTRY(missed_tx),
86+
ENA_STAT_TX_ENTRY(unmask_interrupt),
8687
};
8788

8889
static const struct ena_stats ena_stats_rx_strings[] = {

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,6 +1762,9 @@ static void ena_unmask_interrupt(struct ena_ring *tx_ring,
17621762
tx_ring->smoothed_interval,
17631763
true);
17641764

1765+
u64_stats_update_begin(&tx_ring->syncp);
1766+
tx_ring->tx_stats.unmask_interrupt++;
1767+
u64_stats_update_end(&tx_ring->syncp);
17651768
/* It is a shared MSI-X.
17661769
* Tx and Rx CQ have pointer to it.
17671770
* So we use one of them to reach the intr reg

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ struct ena_stats_tx {
248248
u64 bad_req_id;
249249
u64 llq_buffer_copy;
250250
u64 missed_tx;
251+
u64 unmask_interrupt;
251252
};
252253

253254
struct ena_stats_rx {

0 commit comments

Comments
 (0)