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

Stephen Hemminger
2026-03-25T18:51:34Z

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.