Article View: linux.kernel.netdev
Article #18996Re: [net-next v6 06/15] ice: bump to 256qs for VF
From: netdev-bot+sashiko
Date: Thu, 19 Nov 2026 06:44
Date: Thu, 19 Nov 2026 06:44
184 lines
14832 bytes
14832 bytes
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 (1) · Medium: 2 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] The commit message does not match the code.
- [Medium] ice_lag_cfg_lan_txq()
(drivers/net/ethernet/intel/ice/ice_lag.c) splits the…
Pre-existing issues:
- [High] This problem wasn't introduced by this patch, but it is worth
reporting.
--
ice: bump to 256qs for VF
This commit resizes the ice per-VF bitmaps and arrays (txq_ena, rxq_ena,
qs_bw, LAG q_home) from 16 to 256 queues and widens num_req_qs. It raises
the VIRTCHNL_OP_REQUEST_QUEUES limit to 256. It also splits the LAG
cfg_txqs admin queue command into chunks of at most U8_MAX queues.
> Raise also the limits for the default VF queue count and for
> VIRTCHNL_OP_REQUEST_QUEUES to 256. New virtchnl opcodes, needed to
> make use of more than 16 queues, are handled by subsequent commits
> of this series, the work is split for easier review.
[Severity: Medium]
Is the default VF queue count actually raised by this patch? In
ice_set_per_vf_res() the count is still bounded by the MSI-X count:
num_txq = min_t(u16, num_msix_per_vf - ICE_NONQ_VECS_VF,
ICE_MAX_QS_PER_VF);
num_msix_per_vf is at most ICE_NUM_VF_MSIX_MED (17) and ICE_NONQ_VECS_VF
is 1, so the default stays at 16 or below.
Several functional changes are described only in the v2/v3/v5 notes
below the --- line. Those notes are dropped when the patch is applied:
- ice_vc_cfg_qs_msg() now rolls back by qpair[].rxq.queue_id, up to
last_valid. Before, it used the qpair index i, which could be left over
from the CRC check loop, so it could disable the wrong queues. That
looks like a separate fix.
- ice_lag_cfg_lan_txq() splits the LAG cfg_txqs command into chunks of
at most U8_MAX queues.
- ice_vsi_set_rss_params() changes vsi->rss_size for VF VSIs from 16
to 256.
- struct ice_lag is now allocated with kvzalloc, since q_home grows
to 64KB.
Could the commit message describe these changes? Could the rollback fix
in ice_vc_cfg_qs_msg() go in its own patch?
> diff --git a/drivers/net/ethernet/intel/ice/ice_lag.c b/drivers/net/ethernet/intel/ice/ice_lag.c
> index 08a17ded0ad55..4bb28564c0d65 100644
> --- a/drivers/net/ethernet/intel/ice/ice_lag.c
> +++ b/drivers/net/ethernet/intel/ice/ice_lag.c
> @@ -549,6 +549,41 @@ ice_lag_qbuf_recfg(struct ice_hw *hw, struct ice_aqc_cfg_txqs_buf *qbuf,
> return count;
> }
>
[ ... ]
> +static int
> +ice_lag_cfg_lan_txq(struct ice_hw *hw, struct ice_aqc_cfg_txqs_buf *qbuf,
> + u16 numq, u8 oldport, u8 newport)
> +{
> + while (numq) {
> + int num = min(numq, U8_MAX);
> + int err;
> +
> + err = ice_aq_cfg_lan_txq(hw, qbuf,
> + struct_size(qbuf, queue_info, num),
> + num, oldport, newport,
> + ICE_AQC_Q_CFG_TC_CHNG, NULL);
> + if (err)
> + return err;
[Severity: Medium]
If the second or a later ice_aq_cfg_lan_txq() call fails, firmware has
already moved the Tx queues of the earlier chunks from oldport to
newport. Does anything move them back?
All three callers, ice_lag_move_vf_node_tc(), ice_lag_reclaim_vf_tc()
and ice_lag_move_vf_nodes_tc_sync(), treat the error as if nothing was
applied. They skip ice_aq_move_sched_elems() for the VF VSI node and
resume the subtree:
ice_lag_move_vf_node_tc()
if (ice_lag_cfg_lan_txq(&lag->pf->hw, qbuf, valq, oldport, newport)) {
dev_warn(dev, "Failure to configure queues for LAG failover\n");
goto qbuf_err;
...
qbuf_err:
kfree(qbuf);
resume_traffic:
ice_sched_suspend_resume_elems(&lag->pf->hw, 1, &tmp_teid, false)
The VF's Tx queues would then be split across the two ports, while the
VSI scheduler node stays under the old port's tree. That would last
until the next failover or VF reset.
Before this change the move was a single command, which firmware either
applied in full or rejected in full.
> +
> + numq -= num;
> + memmove(qbuf->queue_info, &qbuf->queue_info[num],
> + numq * sizeof(*qbuf->queue_info));
> + }
> +
> + return 0;
> +}
[ ... ]
> diff --git a/drivers/net/ethernet/intel/ice/ice_lag.h b/drivers/net/ethernet/intel/ice/ice_lag.h
> index 4bfffecbdc975..39f6a6cc844d8 100644
> --- a/drivers/net/ethernet/intel/ice/ice_lag.h
> +++ b/drivers/net/ethernet/intel/ice/ice_lag.h
> @@ -52,7 +52,7 @@ struct ice_lag {
> u8 bond_lport_sec; /* lport values for secondary PF */
>
> /* q_home keeps track of which interface the q is currently on */
> - u8 q_home[ICE_MAX_SRIOV_VFS][ICE_MAX_QS_PER_VF_VCV1];
> + u8 q_home[ICE_MAX_SRIOV_VFS][ICE_MAX_QS_PER_VF];
>
> /* placeholder VSI for hanging VF queues from on secondary interface */
> struct ice_vsi *sec_vf[ICE_MAX_SRIOV_VFS];
[Severity: High]
This is a pre-existing issue and was not introduced by this patch. Is
the per-VF queue count capped at ICE_MAX_QS_PER_VF anywhere?
ice_sriov_set_msix_vec_count() takes its value from a write to the
sriov_vf_msix_count sysfs file:
queues = msix_vec_count;
...
if (queues > min(ice_get_avail_txq_count(pf),
ice_get_avail_rxq_count(pf)))
return -EINVAL;
...
vf->num_vf_qs = queues;
The VF VSI then gets alloc_txq = alloc_rxq = num_vf_qs, and
num_lan_q_entries[0] follows alloc_txq.
In ice_lag_aa_failover() the loop is bounded by
num_q = pv_ctx->num_lan_q_entries[0], and it does:
lag->q_home[vf_id][i] = dest;
For i >= 256, can this write into the next VF's row? For the highest
vf_id, can it write into sec_vf[], which follows q_home in struct
ice_lag, or past the end of the allocation?
The same question applies without LAG. ice_vc_cfg_qs_msg() accepts any
queue_id below vsi->alloc_txq and passes it to
ice_vf_vsi_dis_single_txq(). That function does
test_bit()/clear_bit(q_id, vf->txq_ena) on a 256-bit bitmap. Can a
queue_id >= 256 chosen by the guest clear bits in rxq_ena or in later
fields of struct ice_vf?
The same uncapped path existed before, with the 16-entry sizes. The
later patches in the series don't seem to add a cap in
ice_sriov_set_msix_vec_count() either.
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261117094913.100756-1-przemyslaw.kitszel%40intel.com
Technical Details
Message-ID:
<179507069682.3136.17019862181092608378@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366778-linux-kernel-netdev=dewy.ruReferences:
<20261117094913.100756-7-przemyslaw.kitszel@intel.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366778-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [net-next v6 06/15] ice: bump to 256qs for VF Date: Thu, 19 Nov 2026 06:44:56 +0000 Organization: Usenet Network Message-ID: <179507069682.3136.17019862181092608378@kernel.org> References: <20261117094913.100756-7-przemyslaw.kitszel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2809628"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:KOUnVH6EEp60RmKalKXXThO/Mrc= sha256:5dWLKMz3+SidyIz7ZIPGWCDbdN+A6/2DlSP38YUlcec= sha1:l9+d636rl0nBsDUQBGD7DVc0woU= sha256:vgmFriHgSe0QNjtxKyc3l1/M9+dKqmzVFGH5SMKatd8= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id BCE9011552B; Thu, 19 Nov 2026 09:45:21 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KmdU441wa000; Thu, 19 Nov 2026 09:45:18 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-366778-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id F06C6115528; Thu, 19 Nov 2026 09:45:09 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 9DBB4188207; Thu, 19 Nov 2026 06:45:07 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795070699; b=Ru6Svc1yEjN5XYR35MvSy4KNuV/ZHyEM9Ua3/ZKoojBurXjAd20AZ+AruLJi4VmFo+QP qcvys65g8zr2WsgtcJ4yF4V67XZejKGdsBkSqFemVyi2AsSTAEvDB/wYcSSjlE8QVfJ+X JAS4jpNT1yn6GHBiJ/MAQ/jnh6gOfqnMNri/Zrhig6EZPuiEWnQzyRJW42j5WqXUFe5rN Q3iVlBTNpWXreMgXoHsQHT4HWjgDwaNZKhokc6qGMpOn0eaeWBVwaJNqoEWQZ1N5XaonO 4gekYhL2oluo9eXMcZ92Fr5+nDYcDgObaW2TyuTC4TdvE8Y9zwfo5sjkFBOTqYL340w== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795070699; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=4g6UqbJYoWB4dWQzewc5NsAi2MteBmflyRsOTCVmnxA=; b=FiSmwFTakxAZM+qAN+5rRO+JDslEANKR71fNM+0YY6TkcnPJUcrHaYVPYbYecu6UHMfo D5O6QNHqkRpUCmWCRsJdDpMoD6Xr0isFqBwyhbqCV2gN1LglgfxL+JG2EJiq8ROqaOeW1 wwvuYc1XZIqUWZ5kE4qZy3lTmUiHC0bLnhkV9yjqPHugy6QBhxF6SBeaDXNznxABtqnXL PDbJa5gAhnXICNjG37Z3mXgyLGXQMAfkrp9IL769ntyeRKEPKd26oO4rStoVkK5m0m00R RnaohnO6wtu6TjLmkWayZ3zgIek8c4NAeBy9UmXXy8N+4YX/EQfdEUE3OkoRglHtlVA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LD13h0e7; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 946FF60A260B; Thu, 19 Nov 2026 06:44:59 +0000 (UTC) X-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=LD13h0e7 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795070698; b=j6zi/hE8Aoos5vE801oFbTdNwCZ3DBccfOMx8Tw+NPIO8ZNp1caJZhVp8P0wvrY9thnC 2MmpAl755zKfHfzeJi/iTT9TtrtfxpvFD8dt2s0EkxbT+lCKKkgvKZlpoIQlJBiRRxOql xe8ekPoLRb84MPnEbkiPctfuN5m/ZUYhuADdfTGRTSuarHGx2Tn9gMDg5Sk7MvIzLG82e 8i8SIheXsAVWMplVR8vUjBoh51ukodxeWM+OUH8ebcUKgXryzeNHVjZ0kYlk4aO3eWPSa cUEoW9zKLpd+7jJeObFO3up5gr9Ex821/NiGOAJQvAijE4UqubJelTwuX2jqSRZquDw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795070698; 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=4g6UqbJYoWB4dWQzewc5NsAi2MteBmflyRsOTCVmnxA=; b=ern6uzwpOsIy50FrOvHK+iDVdeNmAWvlC5uq20xMN2vM8TSshyTYc4WeKLSXGMkRpsun RyoKq8CgoMIXepof7E820+o/GGbuzhYjQWyX2DvVuWFKgz8d8RgGKldxpjZvG5CjTWYNc wwxUGeU/sC3P8uDje1zu0X3r+FNOGiofIVPadl1TNwQPEVXtzCsthrb8S1YA2YTIfDNuE ob5LUWh+hGLpn6RbUlNU9vXuwHhceowv+l+5Vxy+HYX1SH7VYLigyRYP9T6i3WtGyRCR0 boeOq/jbyZk01ghoZggizfvoOW/qEtvgjwMSMrTd96GzLyZ6KrTjBjy7omsy0WVe2nA== X-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=LD13h0e7; arc=none smtp.remote-ip=100.103.45.18 X-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 B094860A2600 for <netdev@vger.kernel.org>; Thu, 19 Nov 2026 06:44:58 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 400471F000C4; Thu, 19 Nov 2026 06:44:57 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795070698; bh=4g6UqbJYoWB4dWQzewc5NsAi2MteBmflyRsOTCVmnxA=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=LD13h0e7jrfrIG/+dBBUciLgG7UmIAcgx9ESdRLDNV1Mvw9ghr0F2WTdS8ZQplBE5 rXbpmRlLAAm7GdvIo6AmGiQ415vdgVtFywT0r/srihX6tpEuUues6aOUk9cjreBo0u dmdmGqV/X98l4IDgny/vEBID5a9wDnmis4j2zeOCOoyMGpZSn1lZhlOTI77YmWCS4o HN67xQFqZkWzYPTMS7mrBxdcVdXqyDjrVLBVcNp0TU2EGeOYeFVqewHQzUF8DttRYF 9hrPj7CG8n1DY/wCYLVBmk/8yN00AZMjB1jpeQeCb6rY3F99PVIdTgwZTFo/jFWVYI 6l+O9GKxHZV8w== X-Cc: kuba@kernel.org, netdev@vger.kernel.org, aleksandr.loktionov@intel.com, andrew+netdev@lunn.ch, anthony.l.nguyen@intel.com, anzaki@gmail.com, brett.creeley@amd.com, corbet@lwn.net, davem@davemloft.net, edumazet@kernel.org, horms@kernel.org, jacob.e.keller@intel.com, jedrzej.jagielski@intel.com, jiri@resnulli.us, leon@kernel.org, mbloch@nvidia.com, mschmidt@redhat.com, ohartoov@nvidia.com, pabeni@redhat.com, poros@redhat.com, rdunlap@infradead.org, saeedm@nvidia.com, skhan@linuxfoundation.org, tariqt@nvidia.com X-In-Reply-To: <20261117094913.100756-7-przemyslaw.kitszel@intel.com> X-sashiko-severity: Medium X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list