From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796499762; b=wMscKnCndwjaWVH0McbffzIdLCp/x3yIE5Q65wEU1tN3uVTNOT7kxKDjTvPSJdv0OT8N XJ/ihsPF23N9rqQKsOWs1PD52c9VwxbHcAgvX1IFIXc09nf4IV9Dv9slKh+5JEy02VYEe OJYiGCH7u9MtRj/kLQO6dlOkNh4KyRIek0aUUfI8bfqEZ0r8xSCF4D/9rds7Zre+mImZS 6/bbaI8PfsaXX82sGP8bPh099HD/5OamE8tEmxT9/5oEBwq1i4397oY9B1zWllVfujLMb Qr7OLpCAucarWGe6SB0yTGQyc44EeWvWVi1NrIGPqG9yeL8JitsSJDu28NvBIURmsVA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796499762; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=hcSs6T9s6B3CijUtHiPED85xwjdnS2OOVhvPw5K+PBg=; b=1fOPw1R/klVU3FIURjV/V/i568sww9CwOMVpWXGlJsxSaEdASHMWtY4tlJNZMTIqE82u tMw0lELEDuHtsx/AE2gZxCfPwYB1FHJ9SKP7kbAzmf+6kULpm7eQZ3Pp/TbqWfwCclajy Y9C+zdAmVUTZB5TDo9eMXVWUtadC8RN1FnD+uPApNh/eg+RgNbW6ugCY+9zzOgAUzt5th nFU1CNf/1S1/8V1DMxa/cIyetdPSTwmZDpAxpxW5LmH98r6bOOAYE2stBoe0OwyeBRnVL t8xGfYruMlWv0+Dwcv+1HURnG7DvHf46rShR21IrJwgeNgAqvsa9m0SndJdmWUYJJnA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LHf8ItsW; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50836606A330 for ; Sat, 5 Dec 2026 19:42:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LHf8ItsW Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7A831F0092B; Sat, 5 Dec 2026 19:42:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796499761; bh=hcSs6T9s6B3CijUtHiPED85xwjdnS2OOVhvPw5K+PBg=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=LHf8ItsWpkD2d6BUL5pDhRKNOZE6ZEYwSjki21LqHqnjzh1HnrJgiBPzZn0BI8Zel clObW8NU40bsnxinBoMU8TuqtWe7TpJVCSJZZTrTc4HfZYpJZrQYtyZoh/R/fZf9c4 cqEAw61AoFfE/EaNl+80Hj/LbFbmpqV8DnOpBP5876h+H70ZqeRzloB0o6VcFAgIEG r3Iu11zXgumHzXyztTwe48ZbnsgG5BgbsO4qaQUdRnY+NIZyl+wf/p8tIadcUpwRoN Zn7I6NVvT0GAfUqeoeDXwSY0aYdm+GeAJS9pcJQZ+hdVioCmUxKLTyPUNFnc26qy9m 2htuzvAxoyhEw== Subject: Re: [PATCH net-next v9 13/13] ibmveth: Allow changing the RX queue count From: netdev-bot+sashiko@kernel.org To: mmc@linux.ibm.com Cc: netdev@vger.kernel.org, maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com, chleroy@kernel.org, ritesh.list@gmail.com, sshegde@linux.ibm.com, nnac123@linux.ibm.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, linuxppc-dev@lists.ozlabs.org, horms@kernel.org, davemarq@linux.ibm.com, haren@linux.ibm.com, ricklind@linux.ibm.com, bjking1@linux.ibm.com, shaik.abdulla1@ibm.com, willemb@google.com Date: Sat, 05 Dec 2026 19:42:40 +0000 Message-ID: <179649976030.3148.10183919613130315002@kernel.org> In-Reply-To: <20261201190216.62407-14-mmc@linux.ibm.com> References: <20261201190216.62407-14-mmc@linux.ibm.com> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Thank you for your contribution! Sashiko AI review found more severe issue(s) in other patches of this series. This mail is only an FYI, in case you want to address the nit picks below when you respin. Low priority / nit picks for your consideration: - [Low] The commit message says "A queue count change is logged with the old and new counts", but the code only logs when the RX count changes. -- ibmveth: Allow changing the RX queue count This commit lets ethtool -L change the RX queue count on multi-queue firmware (1 to 16 queues). A running device is closed and reopened to apply the new counts, with a fallback to the old counts and the reset work if the reopen fails. Queue count changes are also logged. > diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c > index 20cb9202b7d3f..87ce6bcda4721 100644 > --- a/drivers/net/ethernet/ibm/ibmveth.c > +++ b/drivers/net/ethernet/ibm/ibmveth.c [ ... ] > @@ -2144,11 +2147,90 @@ static void ibmveth_get_ethtool_stats(struct net_device *dev, > static void ibmveth_get_channels(struct net_device *netdev, > struct ethtool_channels *channels) > { > + struct ibmveth_adapter *adapter = netdev_priv(netdev); > + > channels->max_tx = ibmveth_real_max_tx_queues(); > channels->tx_count = netdev->real_num_tx_queues; > > - channels->max_rx = netdev->real_num_rx_queues; > channels->rx_count = netdev->real_num_rx_queues; > + channels->max_rx = adapter->multi_queue ? > + IBMVETH_MAX_RX_QUEUES : channels->rx_count; > +} > + > +/* Called with the device closed: open() sizes the RX queues and the TX > + * LTBs from these counts. > + */ > +static int ibmveth_set_queue_counts(struct net_device *netdev, > + unsigned int rx, unsigned int tx) > +{ > + struct ibmveth_adapter *adapter = netdev_priv(netdev); > + unsigned int old_rx = adapter->num_rx_queues; > + unsigned int old_tx = netdev->real_num_tx_queues; > + int rc; > + > + rc = netif_set_real_num_queues(netdev, tx, rx); > + if (!rc) { > + adapter->num_rx_queues = rx; > + if (old_rx != rx || old_tx != tx) { > + if (adapter->multi_queue) > + netdev_info(netdev, > + "queues %08x: RX %u -> %u, TX %u -> %u\n", > + adapter->vdev->unit_address, > + old_rx, rx, old_tx, tx); > + else if (old_tx != tx) > + netdev_info(netdev, > + "queues %08x: TX %u -> %u (RX 1)\n", > + adapter->vdev->unit_address, > + old_tx, tx); [Severity: Low] Can this non-MQ branch ever run? Without MQ, ibmveth_get_channels() above sets max_rx to the current rx_count, which is 1. The ethtool core rejects an rx_count above max_rx. It also rejects an rx_count of 0 when combined_count is 0. So on a non-MQ adapter, rx always equals adapter->num_rx_queues, and ibmveth_set_channels() never reaches ibmveth_set_queue_counts(): if (rx != adapter->num_rx_queues) { if (adapter->opened) return ibmveth_reopen_with_counts(netdev, rx, goal); return ibmveth_set_queue_counts(netdev, rx, goal); } There is a related point in the commit message, which says: A queue count change is logged with the old and new counts. A TX-only change such as "ethtool -L tx N" resubmits the current rx_count, so it skips the block above. It takes the existing live TX path in ibmveth_set_channels(), which calls netif_set_real_num_tx_queues() and logs nothing. Should the commit message or the logging be adjusted so they match, and can the unreachable non-MQ branch be dropped? > + } > + } > + return rc; > +} [ ... ] -- Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261201190216.62407-1-mmc%40linux.ibm.com