From: Jakub Kicinski <kuba@kernel.org>
To: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Cc: lorenzo@kernel.org, andrew+netdev@lunn.ch, pabeni@redhat.com,
vadim.fedorenko@linux.dev, davem@davemloft.net,
guwen@linux.alibaba.com, lulie@linux.alibaba.com,
hkallweit1@gmail.com, edumazet@google.com,
lukas.bulwahn@redhat.com, andrew@lunn.ch, dong100@mucse.com,
dust.li@linux.alibaba.com, netdev@vger.kernel.org
Subject: Re: [net-next,v25,4/6] eea: create/destroy rx,tx queues for netdevice open and stop
Date: Wed, 4 Feb 2026 18:31:44 -0800 [thread overview]
Message-ID: <20260204183144.5c5941ed@kernel.org> (raw)
In-Reply-To: <1770205572.2731752-1-xuanzhuo@linux.alibaba.com>
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.
next prev parent reply other threads:[~2026-02-05 2:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-02 9:06 [PATCH net-next v25 0/6] eea: Add basic driver framework for Alibaba Elastic Ethernet Adaptor Xuan Zhuo
2026-02-02 9:06 ` [PATCH net-next v25 1/6] eea: introduce PCI framework Xuan Zhuo
2026-02-02 9:06 ` [PATCH net-next v25 2/6] eea: introduce ring and descriptor structures Xuan Zhuo
2026-02-02 9:06 ` [PATCH net-next v25 3/6] eea: probe the netdevice and create adminq Xuan Zhuo
2026-02-02 9:06 ` [PATCH net-next v25 4/6] eea: create/destroy rx,tx queues for netdevice open and stop Xuan Zhuo
2026-02-04 4:00 ` [net-next,v25,4/6] " Jakub Kicinski
2026-02-04 4:12 ` Jakub Kicinski
2026-02-04 11:46 ` Xuan Zhuo
2026-02-05 2:31 ` Jakub Kicinski [this message]
2026-02-05 1:48 ` Xuan Zhuo
2026-02-05 2:33 ` Jakub Kicinski
2026-02-02 9:06 ` [PATCH net-next v25 5/6] eea: introduce ethtool support Xuan Zhuo
2026-02-02 9:06 ` [PATCH net-next v25 6/6] eea: introduce callback for ndo_get_stats64 Xuan Zhuo
2026-02-04 4:08 ` [net-next,v25,6/6] " Jakub Kicinski
2026-02-04 4:13 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260204183144.5c5941ed@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=dong100@mucse.com \
--cc=dust.li@linux.alibaba.com \
--cc=edumazet@google.com \
--cc=guwen@linux.alibaba.com \
--cc=hkallweit1@gmail.com \
--cc=lorenzo@kernel.org \
--cc=lukas.bulwahn@redhat.com \
--cc=lulie@linux.alibaba.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vadim.fedorenko@linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox