Re: [PATCH net-next] tg3: extract GRXRINGS from .get_rxnfc

From: Michael Chan

Date: Thu Nov 06 2025 - 01:01:05 EST


On Wed, Nov 5, 2025 at 5:01 PM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> On Wed, 5 Nov 2025 11:05:34 -0800 Michael Chan wrote:
> > The existing code to use num_online_cpus() is actually not correct.
> > This is more correct:
> >
> > return min(netif_get_num_default_rss_queues(), tp->rxq_max);
> >
> > I think when netif_get_num_default_rss_queues() was used to replace
> > num_online_cpus(), tg3_get_rxnfc() was not properly converted.
>
> All true, but perhaps we want to do that change as a follow up?
> Someone may show up later insisting that fewer queues cases
> a regression for their workload..

Sure, we can fix this separately. This returned value here when
!netif_running() really won't change the ring count when it becomes
netif_running(). tg3_open() will call tg3_enable_msix() which will
set it to netif_get_num_default_rss_queues() regardless of what value
we return here. IOW, fixing it should not cause any change in the
number of default rings.

Anyway,
Reviewed-by: Michael Chan <michael.chan@xxxxxxxxxxxx>


>
> The sensitivity to default queue count was why we didn't change most
> of the drivers when netif_get_num_default_rss_queues() got reworked
> to a more sane default than 8.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature