Subject: Re: [PATCH net-next 3/4] net-sysfs: prevent uncleared queues from being re-added

From: Jakub Kicinski <[email-masked]>
Date: Tue, 21 Jan 2025 09:09:55 -0800

On Tue, 21 Jan 2025 10:33:54 +0100 Antoine Tenart wrote:
> Quoting Jakub Kicinski (2025-01-20 20:44:00)
> > On Fri, 17 Jan 2025 11:26:10 +0100 Antoine Tenart wrote:  
> > > +     if (unlikely(kobj->state_initialized))
> > > +             return -EAGAIN;  
> > 
> > we could do some weird stuff here like try to ignore the sysfs 
> > objects and "resynchronize" them before releasing rtnl.
> > Way to hacky to do now, but also debugging a transient EAGAIN
> > will be a major PITA. How about we add a netdev_warn_once()
> > here to leave a trace of what happened in the logs?  
> 
> I'm not sure as the above can happen in normal conditions, although
> removing and re-adding queues very shortly might be questionable? On the
> other hand I get your point and that might not happen very frequently
> under normal conditions and that's just because I'm hammering the thing
> for testing.
> 
> It feel a bit weird to warn something that is not unexpected behavior,
> but if you still prefer having a warn_once for better UX I can add it,
> let me know.

IMHO it's worth adding, but I also don't feel very strongly about it :S