Re: [PATCH net-next v10 7/7] r8169: support setting rx queue numbers via ethtool

Jakub Kicinski <[email protected]>
Newsgroups org.kernel.vger.netdev,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Mon, 3 Aug 2026 10:13:05 +0800 javen wrote:
> +static int rtl8169_set_channels(struct net_device *dev,
> +				struct ethtool_channels *ch)
> +{
> +	struct rtl8169_private *tp = netdev_priv(dev);
> +	bool if_running = netif_running(dev);
> +	enum rx_desc_type old_rx_desc_type;
> +	enum rx_desc_type new_desc_type;
> +	struct rtl8169_rx_ring *new_rx;
> +	int i, ret;

This patch is missing a lot of safeties, AFAICT.
We require that the driver is resilient to memory allocation failures -
if the memory allocations for new rings fails you should restore old
rings. Calling rtl8169_up(tp) and hoping for the best is not going to
fly.

Let's leave the live reconfig to a separate series, in the interest
of making progress. Please return EBUSY if the netif_running() and
you can tackle live reconfig separately?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.