]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
bnxt_en: Add software "missed_irqs" counter.
authorMichael Chan <michael.chan@broadcom.com>
Thu, 15 Nov 2018 08:25:41 +0000 (03:25 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Nov 2018 17:37:15 +0000 (09:37 -0800)
To keep track of the number of times the workaround code for 57500 A0
has been triggered.  This is a per NQ counter.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

index 5d4147a75cadc122858b299927c678a7599628ec..d4c30011752992ccf6d0f48d6f119e6950041e19 100644 (file)
@@ -8909,6 +8909,7 @@ static void bnxt_chk_missed_irq(struct bnxt *bp)
                        bnxt_dbg_hwrm_ring_info_get(bp,
                                DBG_RING_INFO_GET_REQ_RING_TYPE_L2_CMPL,
                                fw_ring_id, &val[0], &val[1]);
+                       cpr->missed_irqs++;
                }
        }
 }
index 00bd17e55e99b9cf79ea2cf8817511531dfc055a..9e99d4ab3e062fe14fee7cd78b8626032fa5c705 100644 (file)
@@ -818,6 +818,7 @@ struct bnxt_cp_ring_info {
        dma_addr_t              hw_stats_map;
        u32                     hw_stats_ctx_id;
        u64                     rx_l4_csum_errors;
+       u64                     missed_irqs;
 
        struct bnxt_ring_struct cp_ring_struct;
 
index 48078564f0258cf2d862bd6d57c9d0da79d072a1..4b734cd81f8b1630310810cd3cdb1b9f91e2c0f9 100644 (file)
@@ -137,7 +137,7 @@ reset_coalesce:
        return rc;
 }
 
-#define BNXT_NUM_STATS 21
+#define BNXT_NUM_STATS 22
 
 #define BNXT_RX_STATS_ENTRY(counter)   \
        { BNXT_RX_STATS_OFFSET(counter), __stringify(counter) }
@@ -384,6 +384,7 @@ static void bnxt_get_ethtool_stats(struct net_device *dev,
                for (k = 0; k < stat_fields; j++, k++)
                        buf[j] = le64_to_cpu(hw_stats[k]);
                buf[j++] = cpr->rx_l4_csum_errors;
+               buf[j++] = cpr->missed_irqs;
 
                bnxt_sw_func_stats[RX_TOTAL_DISCARDS].counter +=
                        le64_to_cpu(cpr->hw_stats->rx_discard_pkts);
@@ -468,6 +469,8 @@ static void bnxt_get_strings(struct net_device *dev, u32 stringset, u8 *buf)
                        buf += ETH_GSTRING_LEN;
                        sprintf(buf, "[%d]: rx_l4_csum_errors", i);
                        buf += ETH_GSTRING_LEN;
+                       sprintf(buf, "[%d]: missed_irqs", i);
+                       buf += ETH_GSTRING_LEN;
                }
                for (i = 0; i < BNXT_NUM_SW_FUNC_STATS; i++) {
                        strcpy(buf, bnxt_sw_func_stats[i].string);