s390/qeth: count TX completion interrupts
authorJulian Wiedmann <jwi@linux.ibm.com>
Fri, 11 Jun 2021 07:33:33 +0000 (09:33 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Jun 2021 19:49:15 +0000 (12:49 -0700)
While the qdio layer already tracks the number of HW interrupts for a
device, there's value in understanding how many of them have been
raised due to our TX completion logic.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core.h
drivers/s390/net/qeth_core_main.c
drivers/s390/net/qeth_ethtool.c

index fd9b869d278edaf31ecc6186aba8fac37f68a069..3a49ef8dd906acbe5bb187ec6e922063b903b242 100644 (file)
@@ -483,6 +483,7 @@ struct qeth_out_q_stats {
        u64 stopped;
        u64 doorbell;
        u64 coal_frames;
+       u64 completion_irq;
        u64 completion_yield;
        u64 completion_timer;
 
index a1f08e9aa064c894b4dbc1cdee7a40ac2eaf1c57..9085f22ca34c84255c93781d2747e545c476321c 100644 (file)
@@ -1400,8 +1400,10 @@ static void qeth_clear_output_buffer(struct qeth_qdio_out_q *queue,
        int i;
 
        /* is PCI flag set on buffer? */
-       if (buf->buffer->element[0].sflags & SBAL_SFLAGS0_PCI_REQ)
+       if (buf->buffer->element[0].sflags & SBAL_SFLAGS0_PCI_REQ) {
                atomic_dec(&queue->set_pci_flags_count);
+               QETH_TXQ_STAT_INC(queue, completion_irq);
+       }
 
        qeth_tx_complete_buf(buf, error, budget);
 
index 3a51bbff0ffe5aa7c06561fc2de1320b82a4058f..190dac2065df47c0358e66d8c43708cf350df1ae 100644 (file)
@@ -41,6 +41,7 @@ static const struct qeth_stats txq_stats[] = {
        QETH_TXQ_STAT("Queue stopped", stopped),
        QETH_TXQ_STAT("Doorbell", doorbell),
        QETH_TXQ_STAT("IRQ for frames", coal_frames),
+       QETH_TXQ_STAT("Completion IRQ", completion_irq),
        QETH_TXQ_STAT("Completion yield", completion_yield),
        QETH_TXQ_STAT("Completion timer", completion_timer),
 };