From: sashiko-bot@kernel.org
To: "Long Li" <longli@microsoft.com>
Cc: linux-hyperv@vger.kernel.org
Subject: Re: [PATCH net-next v12 2/6] net: mana: Query device capabilities and configure MSI-X sharing for EQs
Date: Sat, 06 Jun 2026 00:57:47 +0000 [thread overview]
Message-ID: <20260606005748.139881F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260605005717.2059954-3-longli@microsoft.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Permanent downward clamping of maximum queues (`apc->max_queues`) across suspend/resume cycles.
--
commit ae1648776d10be5e3fd6640d34f239a82e77a213
Author: Long Li <longli@microsoft.com>
Subject: net: mana: Query device capabilities and configure MSI-X sharing for EQs
This commit adjusts the max number of queues to allow dedicated MSI-X
vectors for each vPort and configures MSI-X sharing when resources are
scarce. It also updates port initialization to clamp the queue counts
to the recomputed per-vPort maximums.
> diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c
> index ed60cc15fe78d..3ec8e94e7c17e 100644
> --- a/drivers/net/ethernet/microsoft/mana/mana_en.c
> +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
[ ... ]
> @@ -3208,6 +3213,8 @@ static int mana_init_port(struct net_device *ndev)
> max_queues = min_t(u32, max_txq, max_rxq);
> if (apc->max_queues > max_queues)
> apc->max_queues = max_queues;
> + if (apc->max_queues > gc->max_num_queues_vport)
> + apc->max_queues = gc->max_num_queues_vport;
[Severity: Medium]
Will this result in a permanent downward clamping of the maximum queues across
suspend and resume cycles?
Because gc->max_num_queues_vport is dynamically recalculated on every
suspend/resume cycle based on current hardware state (such as the number of
online CPUs and available MSI-X vectors), it might temporarily shrink.
If a system resumes with fewer vectors, this logic reduces apc->max_queues.
However, if the system subsequently resumes again with the original number of
vectors restored, apc->max_queues cannot recover because this clamping only
ever reduces the value and the original allocation limit is permanently
overwritten.
Should we be clamping a temporary runtime variable instead of permanently
modifying the device's capability maximums here?
>
> if (apc->num_queues > apc->max_queues)
> apc->num_queues = apc->max_queues;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260605005717.2059954-1-longli@microsoft.com?part=2
next prev parent reply other threads:[~2026-06-06 0:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-05 0:57 [PATCH net-next v12 0/6] net: mana: Per-vPort EQ and MSI-X management Long Li
2026-06-05 0:57 ` [PATCH net-next v12 1/6] net: mana: Create separate EQs for each vPort Long Li
2026-06-05 0:57 ` [PATCH net-next v12 2/6] net: mana: Query device capabilities and configure MSI-X sharing for EQs Long Li
2026-06-06 0:57 ` sashiko-bot [this message]
2026-06-05 0:57 ` [PATCH net-next v12 3/6] net: mana: Introduce GIC context with refcounting for interrupt management Long Li
2026-06-05 0:57 ` [PATCH net-next v12 4/6] net: mana: Use GIC functions to allocate global EQs Long Li
2026-06-05 0:57 ` [PATCH net-next v12 5/6] net: mana: Allocate interrupt context for each EQ when creating vPort Long Li
2026-06-05 0:57 ` [PATCH net-next v12 6/6] RDMA/mana_ib: Allocate interrupt contexts on EQs Long Li
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=20260606005748.139881F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=sashiko-reviews@lists.linux.dev \
/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