Re: [PATCH v2] app/testpmd: add configurable flow count for txonly multi-flow

Stephen Hemminger
2026-03-02T20:00:50Z

On Fri, 27 Feb 2026 14:43:19 -0800
Stephen Hemminger <stephen@networkplumber.org> wrote:

> The txonly multi-flow mode generates 64 unique UDP source ports per
> lcore by cycling the high byte from 0xC0 to 0xFF. On SmartNICs with
> limited hardware flow table caching, this fixed count can exhaust the
> flow cache and degrade receive-side performance.
>
> Add --txonly-flows=N command line parameter and 'set txonly-flows'
> runtime command to limit the number of unique source ports per lcore
> to between 1 and 64. The default remains 64 to preserve existing
> behavior.
>
> The source port encoding is unchanged: the low byte carries the lcore
> ID (avoiding atomics) and the high byte cycles through N values
> starting at 0xC0. Total unique flows = txonly_nb_flows * active_lcores.
>
> Reported-by: Long Li <longli@microsoft.com>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> Tested-by: Long Li <longli@microsoft.com>

Applied to next-net (after fixing spelling errors).