public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Dariusz Sosnowski <dsosnowski@nvidia.com>
Cc: Aman Singh <aman.deep.singh@intel.com>, <dev@dpdk.org>,
	Thomas Monjalon <thomas@monjalon.net>,
	Raslan Darawsheh <rasland@nvidia.com>,
	"Adrian Schollmeyer" <a.schollmeyer@syseleven.de>
Subject: Re: [PATCH 1/2] app/testpmd: assign share group dynamically
Date: Tue, 24 Mar 2026 08:15:53 -0700	[thread overview]
Message-ID: <20260324081553.1e38e474@phoenix.local> (raw)
In-Reply-To: <20260324123709.3471-2-dsosnowski@nvidia.com>

On Tue, 24 Mar 2026 13:37:08 +0100
Dariusz Sosnowski <dsosnowski@nvidia.com> wrote:

> Testpmd exposes "--rxq-share=[N]" parameter which controls
> sharing Rx queues. Before this patch logic was that either:
> 
> - all queues were assigned to the same share group
>   (when N was not passed),
> - or ports were grouped in subsets of N ports,
>   each subset got different share group index.
> 
> 2nd option did not work well with dynamic representor probing,
> where new representors would be assigned to new share group.
> 
> This patch changes the logic in testpmd to dynamically
> assign share group index. Each unique switch and Rx domain
> will get different share group.
> 
> Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
> ---

AI review feedback:

The logic is sound — assign_share_group() maps each unique (domain_id,
rx_domain) pair to a share group index via a simple linear scan of a
fixed-size slot table. No correctness bugs found. Two warnings:

Warning: share_group_slots[] entries are never freed on port removal.
With dynamic representor probing and hot-unplug cycles, the slot array
(sized RTE_MAX_ETHPORTS, default 32) could fill up. The RTE_ASSERT will
fire in debug builds, but in release builds the behavior would be
reading an uninitialized slot. Consider adding cleanup when a port is
removed, or document the limitation.

Warning: share_group_slots[] should be declared static. It's a
file-scope global without the rte_ prefix and only accessed within
testpmd.c. Making it static gives it proper scoping.

  reply	other threads:[~2026-03-24 15:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-24 12:37 [PATCH 0/2] app/testpmd: assign share group dynamically Dariusz Sosnowski
2026-03-24 12:37 ` [PATCH 1/2] " Dariusz Sosnowski
2026-03-24 15:15   ` Stephen Hemminger [this message]
2026-03-25 16:45   ` Stephen Hemminger
2026-03-24 12:37 ` [PATCH 2/2] app/testpmd: revert switch domain mismatch check Dariusz Sosnowski
2026-03-24 15:17   ` Stephen Hemminger
2026-03-24 16:56 ` [PATCH v2 0/2] app/testpmd: assign share group dynamically Dariusz Sosnowski
2026-03-24 16:56   ` [PATCH v2 1/2] " Dariusz Sosnowski
2026-03-25 16:49     ` Stephen Hemminger
2026-03-25 18:06       ` Dariusz Sosnowski
2026-03-25 16:50     ` Stephen Hemminger
2026-03-25 18:12       ` Dariusz Sosnowski
2026-03-24 16:56   ` [PATCH v2 2/2] app/testpmd: revert switch domain mismatch check Dariusz Sosnowski
2026-03-25 18:02   ` [PATCH v3 0/2] app/testpmd: assign share group dynamically Dariusz Sosnowski
2026-03-25 18:02     ` [PATCH v3 1/2] " Dariusz Sosnowski
2026-03-25 18:51       ` Stephen Hemminger
2026-03-25 19:11         ` Dariusz Sosnowski
2026-03-25 18:02     ` [PATCH v3 2/2] app/testpmd: revert switch domain mismatch check Dariusz Sosnowski
2026-03-25 19:09     ` [PATCH v4 0/2] app/testpmd: assign share group dynamically Dariusz Sosnowski
2026-03-25 19:09       ` [PATCH v4 1/2] " Dariusz Sosnowski
2026-03-25 19:09       ` [PATCH v4 2/2] app/testpmd: revert switch domain mismatch check Dariusz Sosnowski
2026-03-25 20:16       ` [PATCH v4 0/2] app/testpmd: assign share group dynamically Stephen Hemminger

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=20260324081553.1e38e474@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=a.schollmeyer@syseleven.de \
    --cc=aman.deep.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=thomas@monjalon.net \
    /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