From: Michael Chan <michael.chan@broadcom.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com
Subject: Re: [PATCH net-next 3/3] eth: bnxt: handle invalid Tx completions more gracefully
Date: Tue, 11 Jul 2023 01:00:24 -0700 [thread overview]
Message-ID: <CACKFLikGR5qa8+ReLi2krEH9En=5QRv0txEVcM2FE-W6Lc6UuA@mail.gmail.com> (raw)
In-Reply-To: <20230710205611.1198878-4-kuba@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]
On Mon, Jul 10, 2023 at 1:56 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> 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.
It generally looks good to me. I have a few comments below.
The logic is very similar to the bnapi->in_reset logic to reset due to
RX errors. We have a counter for the number of times we do the RX
reset so I think it might be good to add a similar TX reset counter.
The XDP code path can potentially crash in a similar way if we get a
bad completion from hardware. I'm not sure if we should add similar
logic to the XDP code path.
Thanks.
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]
next prev parent reply other threads:[~2023-07-11 8:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 20:56 [PATCH net-next 0/3] eth: bnxt: handle invalid Tx completions more gracefully Jakub Kicinski
2023-07-10 20:56 ` [PATCH net-next 1/3] eth: bnxt: move and rename reset helpers Jakub Kicinski
2023-07-10 20:56 ` [PATCH net-next 2/3] eth: bnxt: take the bit to set as argument of bnxt_queue_sp_work() Jakub Kicinski
2023-07-10 20:56 ` [PATCH net-next 3/3] eth: bnxt: handle invalid Tx completions more gracefully Jakub Kicinski
2023-07-11 8:00 ` Michael Chan [this message]
2023-07-12 0:01 ` Michael Chan
2023-07-12 1:09 ` Jakub Kicinski
2023-07-12 4:11 ` Michael Chan
2023-07-12 4:24 ` Jakub Kicinski
2023-07-12 4:50 ` Michael Chan
2023-07-12 16:35 ` Jakub Kicinski
2023-07-11 10:10 ` Paolo Abeni
2023-07-12 1:19 ` Jakub Kicinski
2023-07-12 6:50 ` Paolo Abeni
2023-07-12 16:34 ` Jakub Kicinski
2023-07-12 20:31 ` Paolo Abeni
2023-07-12 20:50 ` Jakub Kicinski
2023-07-10 21:44 ` [PATCH net-next 0/3] " Michael Chan
2023-07-11 0:38 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACKFLikGR5qa8+ReLi2krEH9En=5QRv0txEVcM2FE-W6Lc6UuA@mail.gmail.com' \
--to=michael.chan@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).