mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Björn Töpel" <bjorn@kernel.org>
To: netdev-bot+sashiko@kernel.org
Cc: alexanderduyck@fb.com, kuba@kernel.org, kernel-team@meta.com,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	pabeni@redhat.com, linux@armlinux.org.uk, netdev@vger.kernel.org,
	mohsin.bashr@gmail.com, mike.marciniszyn@gmail.com,
	leitao@debian.org, horms@kernel.org, almasrymina@google.com,
	linux-kernel@vger.kernel.org, netdev-bot+sashiko@kernel.org
Subject: Re: [PATCH net v2] eth: fbnic: Keep real queue counts synchronized
Date: Mon, 28 Sep 2026 11:02:14 +0200	[thread overview]
Message-ID: <87h5j94ull.fsf@all.your.base.are.belong.to.us> (raw)
In-Reply-To: <179036391870.2160803.457228716006507823@kernel.org>

netdev-bot+sashiko@kernel.org writes:

> Thank you for your contribution! Sashiko AI review found 1 potential
> issue(s) to consider.
>
> Critical: 0 · High: 1 · Medium: 0 · Low: 0
>
> If you believe none of the issues are legitimate, please reply to each
> issue of Medium severity or higher and explain why the AI is wrong.
> If any of them are legitimate and you plan to respin, please let patchwork
> know by including "pw-bot: cr" as a separate line at the end of your reply
> (one such reply per series is enough).
>
> - [High] The patch adds a hard `-ENOSPC` exit to `__fbnic_pm_resume()`
>   (drivers/net/ethernet/meta/fbnic/fbnic_pci.c:523-529).
>
> --
>
> eth: fbnic: Keep real queue counts synchronized
>
> The patch publishes the default channel counts, and the counts set while
> the device is down, to the core with netif_set_real_num_queues() right
> away. It adds num_napi_cfg so the configured NAPI count survives suspend.
> Resume now fails with -ENOSPC if fewer vectors come back than that layout
> needs.
>
> Link: https://lore.kernel.org/netdev/178915061000.219967.7726187707862333281@kernel.org/
>
>> diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_pci.c b/drivers/net/ethernet/meta/fbnic/fbnic_pci.c
>> index c6698e3002a13..48279a5214c8a 100644
>> --- a/drivers/net/ethernet/meta/fbnic/fbnic_pci.c
>> +++ b/drivers/net/ethernet/meta/fbnic/fbnic_pci.c
>
> [ ... ]
>
>> @@ -519,8 +520,16 @@ static int __fbnic_pm_resume(struct device *dev)
>>  
>>  	fbn = netdev_priv(netdev);
>>  
>> -	/* Reset the queues if needed */
>> -	fbnic_reset_queues(fbn, fbn->num_tx_queues, fbn->num_rx_queues);
>> +	max_napis = fbd->num_irqs - FBNIC_NON_NAPI_VECTORS;
>> +	if (fbn->num_napi_cfg > max_napis) {
>> +		netdev_err(netdev,
>> +			   "Unable to restore channel configuration: %u NAPI vectors required, only %u available\n",
>> +			   fbn->num_napi_cfg, max_napis);
>> +		err = -ENOSPC;
>> +		goto unlock;
>> +	}
>
> [Severity: High]
> Can this leave the NIC unusable after a resume or an AER slot reset that
> used to recover?

Thanks, this is valid. The resume path limits the IRQ request using the
online CPU count, then rejects the resulting allocation against the
saved configuration. It can therefore fail without ever asking PCI for
the required number of vectors. The administratively-down and AER cases
are valid as well.

I'll rework the IRQ allocation and resume handling.

pw-bot: cr

      reply	other threads:[~2026-09-28  9:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24 19:18 Björn Töpel
2026-09-25  8:23 ` Breno Leitao
2026-09-25 12:54   ` Björn Töpel
2026-09-25 19:18 ` netdev-bot+sashiko
2026-09-28  9:02   ` Björn Töpel [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=87h5j94ull.fsf@all.your.base.are.belong.to.us \
    --to=bjorn@kernel.org \
    --cc=alexanderduyck@fb.com \
    --cc=almasrymina@google.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.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®