All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Long Li" <longli@microsoft.com>
Cc: linux-hyperv@vger.kernel.org
Subject: Re: [PATCH net-next v2 01/13] net: mana: add queue-set allocation and teardown helpers
Date: Fri, 14 Aug 2026 05:05:18 +0000	[thread overview]
Message-ID: <20260814050519.2B8851F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260813050418.2906468-2-longli@microsoft.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] User-configured RSS indirection table is silently discarded and reset to defaults during per-queue reconfigurations.
--

--- Patch [1]: [PATCH net-next v2 01/13] net: mana: add queue-set allocation and teardown helpers ---
commit fcc6a74602d4e66dc287809434c5e9b44c3be829
Author: Long Li <longli@microsoft.com>
Subject: net: mana: add queue-set allocation and teardown helpers

The ethtool reconfiguration paths (channel count, ring size, private
flags), mana_change_mtu() and mana_xdp_set() rebuild the queues with
mana_detach() then mana_attach(). This adds the data model and helpers for
pre-allocate and swap to independently build and tear down a queue set.

> diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c
> --- a/drivers/net/ethernet/microsoft/mana/mana_en.c
> +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
[ ... ]
> +int mana_alloc_qset(struct mana_port_context *scratch, unsigned int num_queues,
> +		    unsigned int rx_queue_size, unsigned int tx_queue_size,
> +		    u32 priv_flags, struct mana_qset *out)
> +{
> +	struct net_device *ndev = scratch->ndev;
> +	int err;
[ ... ]
> +	err = mana_rss_table_alloc(scratch);
> +	if (err)
> +		goto cleanup_rxq_array;
> +
> +	err = mana_create_eq(scratch);
> +	if (err)
> +		goto cleanup_rss;
> +
> +	err = mana_create_txq(scratch, ndev);
> +	if (err)
> +		goto cleanup_eq;
> +
> +	err = mana_add_rx_queues(scratch, ndev);
> +	if (err)
> +		goto cleanup_rxq;
> +
> +	mana_rss_table_init(scratch);

[Severity: Medium]
Will this unconditionally reset the RSS indirection table to defaults during
reconfigurations?

Since mana_rss_table_alloc() creates a new table and mana_rss_table_init()
initializes it to default round-robin values, it seems like a user's existing
custom RSS steering configuration might be silently overwritten when the new
queue set is published.

Could this cause a regression where the custom configuration is lost? Should
it be preserved by copying the existing table from the active port context
instead?

> +
> +	mana_qset_snapshot(scratch, out);
> +	return 0;

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260813050418.2906468-1-longli@microsoft.com?part=1

  reply	other threads:[~2026-08-14  5:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13  5:04 [PATCH net-next v2 00/13] net: mana: reconfigure by replacing the queue set Long Li
2026-08-13  5:04 ` [PATCH net-next v2 01/13] net: mana: add queue-set allocation and teardown helpers Long Li
2026-08-14  5:05   ` sashiko-bot [this message]
2026-08-13  5:04 ` [PATCH net-next v2 02/13] net: mana: swap queue sets in mana_set_channels Long Li
2026-08-14  5:05   ` sashiko-bot
2026-08-13  5:04 ` [PATCH net-next v2 03/13] net: mana: swap queue sets in mana_set_ringparam Long Li
2026-08-14  5:05   ` sashiko-bot
2026-08-13  5:04 ` [PATCH net-next v2 04/13] net: mana: swap queue sets in mana_set_priv_flags Long Li
2026-08-14  5:05   ` sashiko-bot
2026-08-13  5:04 ` [PATCH net-next v2 05/13] net: mana: swap queue sets in mana_change_mtu Long Li
2026-08-14  5:05   ` sashiko-bot
2026-08-13  5:04 ` [PATCH net-next v2 06/13] net: mana: swap queue sets in mana_xdp_set Long Li
2026-08-13  5:04 ` [PATCH net-next v2 07/13] net: mana: do not bail out of mana_detach on dealloc failure Long Li
2026-08-14  5:05   ` sashiko-bot
2026-08-13  5:04 ` [PATCH net-next v2 08/13] net: mana: keep per-queue statistics in the port context Long Li
2026-08-14  5:05   ` sashiko-bot
2026-08-13  5:04 ` [PATCH net-next v2 09/13] net: mana: share the EQ pool across a queue-set swap Long Li
2026-08-13  5:04 ` [PATCH net-next v2 10/13] net: mana: release EQs left idle by a channel-count reduction Long Li
2026-08-13  5:04 ` [PATCH net-next v2 11/13] net: mana: keep a user-configured RSS table across a queue rebuild Long Li
2026-08-14  5:05   ` sashiko-bot
2026-08-13  5:04 ` [PATCH net-next v2 12/13] net: mana: keep the surviving queues when the channel count is reduced Long Li
2026-08-13  5:04 ` [PATCH net-next v2 13/13] net: mana: keep the existing queues when the channel count is raised Long Li
  -- strict thread matches above, loose matches on Subject: below --
2026-08-11  6:35 [PATCH net-next v2 01/13] net: mana: add queue-set allocation and teardown helpers Long Li
2026-08-11  6:34 [PATCH net-next v2 00/13] net: mana: reconfigure by replacing the queue set Long Li
2026-08-11  6:34 ` [PATCH net-next v2 01/13] net: mana: add queue-set allocation and teardown helpers 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=20260814050519.2B8851F000E9@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.