Subject: Re: [PATCH v2] net/ethernet : set default assignment identifier to NET_NAME_ENUM

From: Jakub Kicinski <[email-masked]>
Date: Tue, 5 Apr 2022 20:47:58 -0700

On Wed, 6 Apr 2022 11:56:51 +1000 Ian Wienand wrote:
> Thanks for review
> 
> On Tue, Apr 05, 2022 at 12:41:03PM -0700, Jakub Kicinski wrote:
> > Can you spell out how netfront gets a different type to virtio?
> > I see alloc_etherdev_mq() in both cases.  
> 
> Yeah I've been doing further testing to narrow this down, and I think
> I've been confused by the renaming happening during the initrd steps.
> 
> It seems that renamed devices (no matter what the driver) will have
> their name_assign_type set to NET_NAME_USER; which [1] gives away as
> coming from the rtnl_newlink path.  virtio devices were renamed in
> init phase in my testing environment, which is why
> /sys/class/net/<iface>/net_name_type works for them by the time
> interactive login starts -- not because they explicitly flag
> themselves.  Sorry for not recognising that earlier.
> 
> > This worries me. Why is UNKNOWN and ENUM treated differently?
> > Can you point me to the code which pays attention to the assign type?  
> 
> Yeah, I'll have to retract that claim; it remains unclear to me why
> CentOS 8-stream does not rename netfront devices (systemd 239) and
> CentOS 9-stream does (systemd 249).
> 
> systemd only seems to use NET_NAME_ENUM in an informational way to
> print a warning when you're using a .link file to set network info for
> a device that might change names [2].
> 
> Perhaps this still has some utility in making that warning more
> useful?

Okay, all good then. I was worried some user space is refusing to
rename UNKNOWN. I have no objection to changing UNKNOWN -> ENUM.
We just need the commit message to be updated.