]> Git Repo - linux.git/commit
eth: bnxt: handle invalid Tx completions more gracefully
authorJakub Kicinski <[email protected]>
Thu, 20 Jul 2023 01:04:40 +0000 (18:04 -0700)
committerJakub Kicinski <[email protected]>
Fri, 21 Jul 2023 03:09:13 +0000 (20:09 -0700)
commit2b56b3d9924160d84c37d085628525666e3b1cea
tree97eaeaaedfd419060ec1785752a2dc9e5a004c17
parent9b1a00fda61ee9874e11c24c6be7ddc36e8a4598
eth: bnxt: handle invalid Tx completions more gracefully

Invalid Tx completions should never happen (tm) but when they do
they crash the host, because driver blindly trusts that there is
a valid skb pointer on the ring.

The completions I've seen appear to be some form of FW / HW
miscalculation or staleness, they have typical (small) values
(<100), but they are most often higher than number of queued
descriptors. They usually happen after boot.

Instead of crashing, print a warning and schedule a reset.

Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Michael Chan <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
This page took 0.062141 seconds and 4 git commands to generate.