Re: [PATCH] wifi: ath11k: allocate dummy net_device dynamically

Jakub Kicinski
2024-03-21T14:26:14Z

On Wed, 20 Mar 2024 07:05:42 -0700 Florian Fainelli wrote:
> > @@ -533,8 +534,11 @@ static int ath11k_ahb_config_ext_irq(struct ath11k_base *ab)
> >
> > irq_grp->ab = ab;
> > irq_grp->grp_id = i;
> > - init_dummy_netdev(&irq_grp->napi_ndev);
> > - netif_napi_add(&irq_grp->napi_ndev, &irq_grp->napi,
> > + irq_grp->napi_ndev = alloc_netdev(0, "dummy", NET_NAME_UNKNOWN,
> > + init_dummy_netdev);
>
> Is not this going to be a problem with multiple network device drivers
> loaded in a given system and all using "dummy" here? While
> NET_NAME_UNKNOWN ensures that this is not exposed to user-space, there
> is still this part of alloc_netdev_mqs() which is going to be non-unique:
>
> ref_tracker_dir_init(&dev->refcnt_tracker, 128, name);

Names are allocated are registration time, I think, so basically all
devices will get an non-uniquely named ref tracker dir. For ethernet
it will be unconverted "eth%d". The name only shows up in some prints,
AFAICT, so not very important?