RE: [PATCH v3 1/2] app/testpmd: assign share group dynamically

Dariusz Sosnowski
2026-03-25T19:11:50Z

> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Wednesday, March 25, 2026 7:51 PM
> To: Dariusz Sosnowski <dsosnowski@nvidia.com>
> Cc: Aman Singh <aman.deep.singh@intel.com>; dev@dpdk.org; NBU-
> Contact-Thomas Monjalon (EXTERNAL) <thomas@monjalon.net>; Raslan
> Darawsheh <rasland@nvidia.com>; Adrian Schollmeyer
> <a.schollmeyer@syseleven.de>
> Subject: Re: [PATCH v3 1/2] app/testpmd: assign share group dynamically
>
> On Wed, 25 Mar 2026 19:02:53 +0100
> Dariusz Sosnowski <dsosnowski@nvidia.com> wrote:
>
> > +static void
> > +try_release_share_group(struct share_group_slot *slot) {
> > + uint16_t pi;
> > + bool group_not_used = true;
> > +
> > + /* Check if any port still uses this share group. */
> > + RTE_ETH_FOREACH_DEV(pi) {
> > + if (ports[pi].dev_info.switch_info.domain_id == slot->domain_id
> &&
> > + ports[pi].dev_info.switch_info.rx_domain == slot->rx_domain) {
> > + group_not_used = false;
> > + break;
> > + }
> > + }
> > + if (group_not_used) {
> > + slot->share_group = 0;
> > + slot->domain_id = 0;
> > + slot->rx_domain = 0;
> > + }
> > +}
>
> Just add a return and skip the group_not_used boolean.

Fixed in v4

Best regards,
Dariusz Sosnowski