Thread (15 messages) flat view 15 messages, 2 authors, 13h ago

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

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-08-10 21:41:01
Also in: lkml

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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help