]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
net: ena: add unmask interrupts statistics to ethtool
authorSameeh Jubran <sameehj@amazon.com>
Sun, 3 May 2020 09:52:16 +0000 (09:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 3 May 2020 22:59:30 +0000 (15:59 -0700)
Add unmask interrupts statistics to ethtool.

Signed-off-by: Netanel Belgazal <netanel@amazon.com>
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_ethtool.c
drivers/net/ethernet/amazon/ena/ena_netdev.c
drivers/net/ethernet/amazon/ena/ena_netdev.h

index c7df25f92dbdb9b0e79708de1154800a3675854b..74725d606964401a6f5e03d30d37f6fdf859bbbc 100644 (file)
@@ -83,6 +83,7 @@ static const struct ena_stats ena_stats_tx_strings[] = {
        ENA_STAT_TX_ENTRY(bad_req_id),
        ENA_STAT_TX_ENTRY(llq_buffer_copy),
        ENA_STAT_TX_ENTRY(missed_tx),
+       ENA_STAT_TX_ENTRY(unmask_interrupt),
 };
 
 static const struct ena_stats ena_stats_rx_strings[] = {
index 6baafc3aebea9194d260f0d445bd44e8a750e45c..3cea4c9090c20de79ee4c833daf9c6b3334a2eb8 100644 (file)
@@ -1762,6 +1762,9 @@ static void ena_unmask_interrupt(struct ena_ring *tx_ring,
                                tx_ring->smoothed_interval,
                                true);
 
+       u64_stats_update_begin(&tx_ring->syncp);
+       tx_ring->tx_stats.unmask_interrupt++;
+       u64_stats_update_end(&tx_ring->syncp);
        /* It is a shared MSI-X.
         * Tx and Rx CQ have pointer to it.
         * So we use one of them to reach the intr reg
index 97dfd0c67e8475d0f9ff5cfa937ddd6043b9b10d..ebeb911c0efb289fd4a599fd728317caef9ae2f7 100644 (file)
@@ -248,6 +248,7 @@ struct ena_stats_tx {
        u64 bad_req_id;
        u64 llq_buffer_copy;
        u64 missed_tx;
+       u64 unmask_interrupt;
 };
 
 struct ena_stats_rx {