diff options
author | Michael Chan <michael.chan@broadcom.com> | 2020-05-04 04:50:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-04 10:44:11 -0700 |
commit | 9d8b5f05529c619b63d68b0dd26a1dfe35a4fab2 (patch) | |
tree | 7d51afe852a1efd657f0638fd2aa01dedff91282 /drivers/net/ethernet/broadcom/bnxt/bnxt.c | |
parent | 098286ff930ca752e4c9295ea65840dd55f5f290 (diff) | |
download | linux-stable-9d8b5f05529c619b63d68b0dd26a1dfe35a4fab2.tar.gz linux-stable-9d8b5f05529c619b63d68b0dd26a1dfe35a4fab2.tar.bz2 linux-stable-9d8b5f05529c619b63d68b0dd26a1dfe35a4fab2.zip |
bnxt_en: Refactor the software ring counters.
We currently have 3 software ring counters, rx_l4_csum_errors,
rx_buf_errors, and missed_irqs. The 1st two are RX counters and the
last one is a common counter. Organize them into 2 structures
bnxt_rx_sw_stats and bnxt_cmn_sw_stats.
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 8f11344b8055..4bbfea147d98 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -1766,7 +1766,7 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, rc = -EIO; if (rx_err & RX_CMPL_ERRORS_BUFFER_ERROR_MASK) { - bnapi->cp_ring.rx_buf_errors++; + bnapi->cp_ring.sw_stats.rx.rx_buf_errors++; if (!(bp->flags & BNXT_FLAG_CHIP_P5)) { netdev_warn(bp->dev, "RX buffer error %x\n", rx_err); @@ -1849,7 +1849,7 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, } else { if (rxcmp1->rx_cmp_cfa_code_errors_v2 & RX_CMP_L4_CS_ERR_BITS) { if (dev->features & NETIF_F_RXCSUM) - bnapi->cp_ring.rx_l4_csum_errors++; + bnapi->cp_ring.sw_stats.rx.rx_l4_csum_errors++; } } @@ -10285,7 +10285,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++; + cpr->sw_stats.cmn.missed_irqs++; } } } |