Looks good now, just one nit, which can be fixed upon merging as well.
On Tue, Oct 21, 2025 at 10:45:27AM +0000, Andrew Bailey wrote:
> diff --git a/dts/api/testpmd/types.py b/dts/api/testpmd/types.py
> index d1ebf6f2d1..46ae034cec 100644
> --- a/dts/api/testpmd/types.py
> +++ b/dts/api/testpmd/types.py
> @@ -1246,7 +1248,99 @@ class TestPmdVerbosePacket(TextParser):
> )
>
>
> -class RxOffloadCapability(Flag):
> +class OffloadCapability(Flag):
<snip>
> + @classmethod
> + def make_parser(
> + cls, per_port: Literal["port", "queue"], /, find_multiple: bool =
> False
I thought this was tackled but I guess it wasn't, this should be
port_or_queue.
> + ) -> ParserFn:
> + """Make a parser function.
> +
> + Args:
> + per_port: If :data:`True`, will return capabilities per port. If
> :data:`False`,
> + will return capabilities per queue.
And this should be updated appropriately.
> + find_multiple: If :data:`True`, will use
> :func:`TextParser.find_all` to find all
> + matches for the regex query and return a list of instances
> based on those matches.
> + If :data:`False`, will return a single instance of the flag
> based off a single
> + match.
> +
> + Returns:
> + ParserFn: A dictionary for the `dataclasses.field` metadata
> argument containing a
> + parser function that makes an instance of this flag from
> text.
> + """
> + granularity = per_port.capitalize()
> + regex = rf"{granularity}[\s\[\]\d]+:(.*)$"
> + if find_multiple:
> + return TextParser.wrap(TextParser.find_all(regex, re.MULTILINE),
> cls.from_list)
> + return TextParser.wrap(TextParser.find(regex, re.MULTILINE),
> cls.from_string)
> +
> +