Skip to content

Commit 1b5c8b6

Browse files
Michael Chandavem330
authored andcommitted
bnxt_en: Reduce unnecessary message log during RX errors.
There is logic in the RX path to detect unexpected handles in the RX completion. We'll print a warning and schedule a reset. The next expected handle is then set to 0xffff which is guaranteed to not match any valid handle. This will force all remaining packets in the ring to be discarded before the reset. There can be hundreds of these packets remaining in the ring and there is no need to print the warnings for these forced errors. Reviewed-by: Pavan Chebbi <[email protected]> Reviewed-by: Edwin Peer <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8a27d4b commit 1b5c8b6

File tree

1 file changed

+4
-2
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+4
-2
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1741,8 +1741,10 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
17411741
if (unlikely(cons != rxr->rx_next_cons)) {
17421742
int rc1 = bnxt_discard_rx(bp, cpr, raw_cons, rxcmp);
17431743

1744-
netdev_warn(bp->dev, "RX cons %x != expected cons %x\n",
1745-
cons, rxr->rx_next_cons);
1744+
/* 0xffff is forced error, don't print it */
1745+
if (rxr->rx_next_cons != 0xffff)
1746+
netdev_warn(bp->dev, "RX cons %x != expected cons %x\n",
1747+
cons, rxr->rx_next_cons);
17461748
bnxt_sched_reset(bp, rxr);
17471749
return rc1;
17481750
}

0 commit comments

Comments
 (0)