[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACKFLikfjPPe8X+4sFXNNBva6bzE_M66J3w8t0DviB7aq=7Bgg@mail.gmail.com>
Date: Fri, 28 Jul 2023 15:28:22 -0700
From: Michael Chan <michael.chan@...adcom.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, Andy Gospodarek <gospo@...adcom.com>
Subject: Re: [PATCH net v2] bnxt: don't handle XDP in netpoll
On Fri, Jul 28, 2023 at 1:50 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> Similarly to other recently fixed drivers make sure we don't
> try to access XDP or page pool APIs when NAPI budget is 0.
> NAPI budget of 0 may mean that we are in netpoll.
>
> This may result in running software IRQs in hard IRQ context,
> leading to deadlocks or crashes.
>
> To make sure bnapi->tx_pkts don't get wiped without handling
> the events, move clearing the field into the handler itself.
> Remember to clear tx_pkts after reset (bnxt_enable_napi())
> as it's technically possible that netpoll will accumulate
> some tx_pkts and then a reset will happen, leaving tx_pkts
> out of sync with reality.
Yes, with your recently added TX reset when the SKB is NULL, this is
definitely a possibility.
>
> Fixes: 322b87ca55f2 ("bnxt_en: add page_pool support")
> Reviewed-by: Andy Gospodarek <gospo@...adcom.com>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
Reviewed-by: Michael Chan <michael.chan@...adcom.com>
Thanks.
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)
Powered by blists - more mailing lists