lkml.org 
[lkml]   [2022]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: new warning caused by ("net-sysfs: update the queue counts in the unregistration path")
From
Date
Quoting Kevin Mitchell (2022-09-28 03:27:46)
> With the inclusion of d7dac083414e ("net-sysfs: update the queue counts in the
> unregistration path"), we have started see the following message during one of
> our stress tests that brings an interface up and down while continuously
> trying to send out packets on it:
>
> et3_11_1 selects TX queue 0, but real number of TX queues is 0
>
> It seems that this is a result of a race between remove_queue_kobjects() and
> netdev_cap_txqueue() for the last packets before setting dev->flags &= ~IFF_UP
> in __dev_close_many(). When this message is displayed, netdev_cap_txqueue()
> selects queue 0 anyway (the noop queue at this point). As it did before the
> above commit, that queue (which I guess is still around due to reference
> counting) proceeds to drop the packet and return NET_XMIT_CN. So there doesn't
> appear to be a functional change. However, the warning message seems to be
> spurious if not slightly confusing.

Do you know the call traces leading to this? Also I'm not 100% sure to
follow as remove_queue_kobjects is called in the unregistration path
while the test is setting the iface up & down. What driver is used?

As you said and looking around queue 0 is somewhat special and used as a
fallback. My suggestion would be to 1) check if the above race is
expected 2) if yes, a possible solution would be not to warn when
real_num_tx_queues == 0 as in such cases selecting queue 0 would be the
expected fallback (and you might want to check places like [1]).

Thanks,
Antoine

[1] https://elixir.bootlin.com/linux/latest/source/net/core/dev.c#L4126

\
 
 \ /
  Last update: 2022-09-28 11:48    [W:0.056 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site