Re: [PATCH net-next 02/11] tools: ynl-gen: generate nested array policies

Donald Hunter <[email protected]> Fri, 05 Sep 2025 11:37:24 +0100
Newsgroups com.zx2c4.lists.wireguard,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <[email protected]>
Asbjørn Sloth Tønnesen <[email protected]> writes:

> This patch adds support for NLA_POLICY_NESTED_ARRAY() policies.
>
> Example spec (from future wireguard.yaml):
> -
>   name: wgpeer
>   attributes:
>     -
>       name: allowedips
>       type: indexed-array
>       sub-type: nest
>       nested-attributes: wgallowedip
>
> yields NLA_POLICY_NESTED_ARRAY(wireguard_wgallowedip_nl_policy).
>
> This doesn't change any currently generated code, as it isn't
> used in any specs currently used for generating code.
>
> Signed-off-by: Asbjørn Sloth Tønnesen <[email protected]>

Reviewed-by: Donald Hunter <[email protected]>