From: Gregory Price <gourry@gourry.net>
To: Michael Chan <michael.chan@broadcom.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, andrew+netdev@lunn.ch,
pavan.chebbi@broadcom.com, andrew.gospodarek@broadcom.com
Subject: Re: [PATCH net-next v3 7/7] bnxt_en: Fix ring accounting and validation when rings are constrained
Date: Tue, 13 Oct 2026 17:50:13 -0400 [thread overview]
Message-ID: <as6mq_WLUJ-SiXI7@gourry-fedora-PF4VCD3F> (raw)
In-Reply-To: <20261012220827.340998-8-michael.chan@broadcom.com>
On Mon, Oct 12, 2026 at 03:08:27PM -0700, Michael Chan wrote:
> When __bnxt_reserve_rings() reserves fewer TX rings than requested,
> and an XDP program is attached, the driver used to blindly subtract
> bp->tx_nr_rings_xdp from bp->tx_nr_rings, potentially causing an integer
> underflow.
>
This is outside my normal space, was reviewing this for testing and had
an agent spot what it thinks is a bug. It seemed reasonable to me but
if you think this is wrong, please ignore.
> @@ -11602,25 +11673,23 @@ int bnxt_reserve_rings(struct bnxt *bp, bool irq_re_init)
> if (!rc)
> rc = bnxt_init_int_mode(bp);
> bnxt_ulp_irq_restart(bp, rc);
> - } else if (irq_change && !rc) {
> - if (bnxt_change_msix(bp, irqs_required) != irqs_required)
> - rc = -ENOSPC;
> + } else if (irq_re_init && BNXT_NEW_RM(bp) && !rc) {
should this be:
} else if (irq_re_init && BNXT_NEW_RM(bp) && bp->irq_tbl && !rc) {
Note from the LLM was:
Unlike irq_change, this no longer implies bp->irq_tbl != NULL. After a
FW/AER reset irq_tbl is gone but total_irqs is stale, so if the rings
shrink we call bnxt_change_msix() with no table and fail with -ENOSPC.
Should this also check bp->irq_tbl?
~Gregory
next prev parent reply other threads:[~2026-10-13 21:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 22:08 [PATCH net-next v3 0/7] bnxt_en: Ring accounting fixes Michael Chan
2026-10-12 22:08 ` [PATCH net-next v3 1/7] bnxt_en: Clear bp->total_irqs in bnxt_init_int_mode() during error Michael Chan
2026-10-12 22:08 ` [PATCH net-next v3 2/7] bnxt_en: Fix bnxt_reinit_features() when irq_re_init is true Michael Chan
2026-10-12 22:08 ` [PATCH net-next v3 3/7] bnxt_en: Refactor RSS table check logic Michael Chan
2026-10-13 0:23 ` Joe Damato
2026-10-12 22:08 ` [PATCH net-next v3 4/7] bnxt_en: Refactor IRQs required logic Michael Chan
2026-10-13 0:25 ` Joe Damato
2026-10-12 22:08 ` [PATCH net-next v3 5/7] bnxt_en: Reinit IRQ when configuring LRO/GRO/HDS Michael Chan
2026-10-12 22:08 ` [PATCH net-next v3 6/7] bnxt_en: Remove support for the old NITRO A0 chip Michael Chan
2026-10-13 0:35 ` Joe Damato
2026-10-12 22:08 ` [PATCH net-next v3 7/7] bnxt_en: Fix ring accounting and validation when rings are constrained Michael Chan
2026-10-13 21:50 ` Gregory Price [this message]
2026-10-13 23:01 ` netdev-bot+sashiko
2026-10-12 22:15 ` [PATCH net-next v3 0/7] bnxt_en: Ring accounting fixes netdev-bot+sinfo
2026-10-12 22:52 ` Michael Chan
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=as6mq_WLUJ-SiXI7@gourry-fedora-PF4VCD3F \
--to=gourry@gourry.net \
--cc=andrew+netdev@lunn.ch \
--cc=andrew.gospodarek@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.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