From: Breno Leitao <leitao@debian.org>
To: "Björn Töpel" <bjorn@kernel.org>
Cc: Alexander Duyck <alexanderduyck@fb.com>,
Jakub Kicinski <kuba@kernel.org>,
kernel-team@meta.com, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Russell King <linux@armlinux.org.uk>,
netdev@vger.kernel.org, Mohsin Bashir <mohsin.bashr@gmail.com>,
"Mike Marciniszyn (Meta)" <mike.marciniszyn@gmail.com>,
Simon Horman <horms@kernel.org>,
Mina Almasry <almasrymina@google.com>,
linux-kernel@vger.kernel.org,
Sashiko <netdev-bot+sashiko@kernel.org>
Subject: Re: [PATCH net] eth: fbnic: Keep real queue counts synchronized
Date: Fri, 18 Sep 2026 04:00:31 -0700 [thread overview]
Message-ID: <aq0ZiAEBNWWrLgms@gmail.com> (raw)
In-Reply-To: <20260915180859.4157646-1-bjorn@kernel.org>
On Tue, Sep 15, 2026 at 08:08:57PM +0200, Björn Töpel wrote:
> alloc_etherdev_mq() initializes the real queue counts to the
> allocation maximum. fbnic selects smaller defaults and can change its
> private queue counts while the device is down, but does not publish
> either value until the next open.
>
> Resume can also allocate fewer IRQs and silently clamp the private
> queue counts. Queues can share NAPI vectors, so changing the
> configured queue counts is unnecessary.
>
> These mismatches can expose an inactive queue for memory-provider
> binding or hide an existing binding. A later channel expansion can
> allocate the queue without recognizing its memory provider.
>
> Publish default and offline channel counts immediately. Reset RSS
> indirection whenever the queue-count helper runs. Preserve queue
> counts across resume and share the remaining NAPI vectors when fewer
> IRQs are available. The RSS table remains valid because it indexes RX
> queues rather than NAPI vectors.
>
> Fixes: da43127a8edc ("eth: fbnic: support queue ops / zero-copy Rx")
> Reported-by: Sashiko <netdev-bot+sashiko@kernel.org>
> Link: https://lore.kernel.org/netdev/178915061000.219967.7726187707862333281@kernel.org/
> Signed-off-by: Björn Töpel <bjorn@kernel.org>
Reviewed-by: Breno Leitao <leitao@debian.org>
> + /* Preserve queue counts, as RX queues may have memory providers bound.
> + * The RSS table indexes RX queues and remains valid. Rebuild only the
> + * NAPI layout, sharing vectors if fewer IRQs are available.
> + */
> + max_napis = fbd->num_irqs - FBNIC_NON_NAPI_VECTORS;
> + max_queues = max(fbn->num_tx_queues, fbn->num_rx_queues);
> + fbn->num_napi = min(max_queues, max_napis);
It seems the comment does not match the code. num_napi is recomputed
unconditionally from max(num_tx, num_rx), which is not what num_napi
was, so isn't the NAPI layout is rebuilt even when the IRQ count is
unchanged?
--breno
prev parent reply other threads:[~2026-09-18 11:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 18:08 Björn Töpel
2026-09-18 6:11 ` netdev-bot+sashiko
2026-09-18 10:33 ` Björn Töpel
2026-09-18 11:00 ` Breno Leitao [this message]
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=aq0ZiAEBNWWrLgms@gmail.com \
--to=leitao@debian.org \
--cc=alexanderduyck@fb.com \
--cc=almasrymina@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=bjorn@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mike.marciniszyn@gmail.com \
--cc=mohsin.bashr@gmail.com \
--cc=netdev-bot+sashiko@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
all inboxes | Powered by JetHome®