Commit 19b3751f authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

bnxt_en: Improve RX buffer error handling.

When hardware reports RX buffer errors, the latest 57500 chips do not
require reset.  The packet is discarded by the hardware and the
ring will continue to operate.

Also, add an rx_buf_errors counter for this type of error.  It can help
the user to identify if the aggregation ring is too small.
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 41136ab3
...@@ -1767,8 +1767,12 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, ...@@ -1767,8 +1767,12 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
rc = -EIO; rc = -EIO;
if (rx_err & RX_CMPL_ERRORS_BUFFER_ERROR_MASK) { if (rx_err & RX_CMPL_ERRORS_BUFFER_ERROR_MASK) {
netdev_warn(bp->dev, "RX buffer error %x\n", rx_err); bnapi->cp_ring.rx_buf_errors++;
bnxt_sched_reset(bp, rxr); if (!(bp->flags & BNXT_FLAG_CHIP_P5)) {
netdev_warn(bp->dev, "RX buffer error %x\n",
rx_err);
bnxt_sched_reset(bp, rxr);
}
} }
goto next_rx_no_len; goto next_rx_no_len;
} }
......
...@@ -932,6 +932,7 @@ struct bnxt_cp_ring_info { ...@@ -932,6 +932,7 @@ struct bnxt_cp_ring_info {
dma_addr_t hw_stats_map; dma_addr_t hw_stats_map;
u32 hw_stats_ctx_id; u32 hw_stats_ctx_id;
u64 rx_l4_csum_errors; u64 rx_l4_csum_errors;
u64 rx_buf_errors;
u64 missed_irqs; u64 missed_irqs;
struct bnxt_ring_struct cp_ring_struct; struct bnxt_ring_struct cp_ring_struct;
......
...@@ -173,6 +173,7 @@ static const char * const bnxt_ring_tpa2_stats_str[] = { ...@@ -173,6 +173,7 @@ static const char * const bnxt_ring_tpa2_stats_str[] = {
static const char * const bnxt_ring_sw_stats_str[] = { static const char * const bnxt_ring_sw_stats_str[] = {
"rx_l4_csum_errors", "rx_l4_csum_errors",
"rx_buf_errors",
"missed_irqs", "missed_irqs",
}; };
...@@ -552,6 +553,7 @@ static void bnxt_get_ethtool_stats(struct net_device *dev, ...@@ -552,6 +553,7 @@ static void bnxt_get_ethtool_stats(struct net_device *dev,
for (k = 0; k < stat_fields; j++, k++) for (k = 0; k < stat_fields; j++, k++)
buf[j] = le64_to_cpu(hw_stats[k]); buf[j] = le64_to_cpu(hw_stats[k]);
buf[j++] = cpr->rx_l4_csum_errors; buf[j++] = cpr->rx_l4_csum_errors;
buf[j++] = cpr->rx_buf_errors;
buf[j++] = cpr->missed_irqs; buf[j++] = cpr->missed_irqs;
bnxt_sw_func_stats[RX_TOTAL_DISCARDS].counter += bnxt_sw_func_stats[RX_TOTAL_DISCARDS].counter +=
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment