Subject: Re: [net-next,v25,4/6] eea: create/destroy rx,tx queues for netdevice open and stop

From: Jakub Kicinski <[email-masked]>
Date: Wed, 4 Feb 2026 18:31:44 -0800

On Wed, 4 Feb 2026 19:46:12 +0800 Xuan Zhuo wrote:
> > I think AI is slightly confused here but so am I. I don't get where you
> > free he previous resources in this flow. The "bind_new_q_and_cfg" just
> > overrides stuff, who frees the old set of rings?  
> 
> 
> 	err = eea_alloc_rxtx_q_mem(ctx);
> 	if (err) {
> 		netdev_warn(enet->netdev,
> 			    "eea reset: alloc q failed. stop reset. err %d\n",
> 			    err);
> 		return err;
> 	}
> 
> 	eea_netdev_stop(enet->netdev); <---- here call eea_free_rxtx_q_mem

Ah, thanks for explaining.
FWIW when I write this sort of logic I use _stop() as "stop the HW"
hence the confusion. Should have read the code..

That said freeing the resources here will prevent you from going 
back to the old config. For instance the sysfs handling
(netif_set_real_num_queues()) could fail during increase.

Best way to implement this is to "swap" the resources between enet 
and ctx, so that you can go back.