[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <786716e9-17b9-41bb-80ca-b65def682f5a@openvpn.net>
Date: Fri, 13 Dec 2024 18:00:41 +0100
From: Antonio Quartulli <antonio@...nvpn.net>
To: Donald Hunter <donald.hunter@...il.com>
Cc: netdev@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Shuah Khan <shuah@...nel.org>, sd@...asysnail.net, ryazanov.s.a@...il.com,
Andrew Lunn <andrew+netdev@...n.ch>, Simon Horman <horms@...nel.org>,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
Xiao Liang <shaw.leon@...il.com>
Subject: Re: [PATCH net-next v15 02/22] ovpn: add basic netlink support
On 13/12/2024 17:45, Donald Hunter wrote:
> On Wed, 11 Dec 2024 at 21:32, Antonio Quartulli <antonio@...nvpn.net> wrote:
>>
>> + name: peer
>> + type: nest
>> + doc: |
>> + The peer object containing the attributed of interest for the specific
>
> typo: attributes
>
>> + operation
>> + nested-attributes: peer
>
> I also spotted that the doc: | construct results in extack messages
> with embedded \n chars in the ynl cli:
>
> ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/ovpn.yaml
> --do peer-new --json '{"ifindex": 2 }'
> Netlink error: Invalid argument
> nl_len = 44 (28) nl_flags = 0x300 nl_type = 2
> error: -22
> extack: {'miss-type': 'peer', 'miss-type-doc': 'The peer object
> containing the attributed of interest for the specific\noperation\n'}
>
> We should probably sanitize the strings in the ynl cli, but you can
> specify a flattened block comment in yaml by using the doc: >-
> construct instead.
I believe I have used | because I saw it in other spec files.
We may want to have a look at those too.
>
> -
> name: peer
> type: nest
> doc: >-
> The peer object containing the attributes of interest for the specific
> operation
>
> extack: {'miss-type': 'peer', 'miss-type-doc': 'The peer object
> containing the attributes of interest for the specific operation'}
This seems to be what I actually wanted.
I will change all |'s to >- then.
Thanks a lot!
Regards,
--
Antonio Quartulli
OpenVPN Inc.
Powered by blists - more mailing lists