From: Donald Hunter <donald.hunter@gmail.com>
To: Hristo Venev <hristo@venev.name>
Cc: Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org, Josef Bacik <josef@toxicpanda.com>,
Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, nbd@other.debian.org
Subject: Re: [PATCH] netlink: specs: add specification for NBD
Date: Wed, 18 Feb 2026 11:28:44 +0000 [thread overview]
Message-ID: <m2fr6yl28j.fsf@gmail.com> (raw)
In-Reply-To: <6a1339999b091edaaa15e34aceb7961dfc61581b.camel@venev.name>
Hristo Venev <hristo@venev.name> writes:
> On Tue, 2026-02-17 at 12:17 +0000, Donald Hunter wrote:
>> There are yamllint errors:
>>
>> make -C tools/net/ynl lint
>> make: Entering directory '/home/donaldh/net-next/tools/net/ynl'
>> yamllint ../../../Documentation/netlink/specs
>> ../../../Documentation/netlink/specs/nbd.yaml
>> 159:81 error line too long (104 > 80 characters) (line-
>> length)
>> 169:6 error syntax error: expected <block end>, but found
>> '<block mapping start>' (syntax)
>> 170:7 error wrong indentation: expected 5 but found 6
>> (indentation)
>
> Thanks, I will fix the lint errors in v2.
>
>> > +doc: See :file:`drivers/block/nbd.c`
>>
>> Prefer to see a meaningful doc string here.
>
> I will add more proper documentation in v2. I couldn't find any
> existing documentation of this netlink interface, so I guess I will
> write it myself.
>
>> > +attribute-sets:
>> > + -
>> > + name: nbd-attrs
>> > + name-prefix: nbd-attr-
>> > + doc: Configuration policy attributes, used for CONNECT
>> > + attributes:
>> > + -
>> > + name: unspec
>> > + value: 0
>> > + type: unused
>>
>> No need for unspec in the attribute list, ynl codegen does the right
>> thing.
>
> For me `pyynl.ynl_gen_c --mode uapi --header` no longer generates
> `NBD_ATTR_UNSPEC` if I remove this. Is there a YNL property to specify
> the name of the zero value of the attribute set? If not, should I
> remove it anyway, changing the generated header?
Oh sorry, if your goal is 100% equivalence then I guess you need it. We
have the same in "fou" for example.
>> > +operations:
>> > + enum-model: unified
>> > + name-prefix: nbd-cmd-
>> > + list:
>> > + -
>> > + name: unspec
>> > + value: 0
>> > + doc: NBD_CMD_UNSPEC
>
> A similar question applies here. If I remove this, `pyynl.ynl_gen_c
> --mode uapi --header` no longer generates `NBD_CMD_UNSPEC`. Is there a
> YNL property to generate it? If not, should I remove it anyway?
You'll need to keep it for equivalence.
>> > + -
>> > + name: connect
>> > + doc: See :file:`drivers/block/nbd.c`,
>> > :code:`nbd_genl_connect()`
>>
>> Prefer to see meaningful doc string (same for other ops)
>
> I guess I will have to document the four operations in v2 as well.
>
>> > + attribute-set: nbd-attrs
>> > + dont-validate: [strict]
>>
>> nbd.c has strict & dump, should this be [strict, dump] ? (same for
>> other ops)
>
> The NBD operations don't have `dump`, only `do`, so adding `dump` to
> `dont-validate` does not change the output of `pyynl.ynl_gen_c --mode
> kernel --source`. Should I add it anyway?
Ah, so it's redundant in nbd.c.
Thanks,
Donald.
next prev parent reply other threads:[~2026-03-04 12:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-15 18:03 [PATCH] netlink: specs: add specification for NBD Hristo Venev
2026-02-17 12:17 ` Donald Hunter
2026-02-17 17:40 ` Hristo Venev
2026-02-18 11:28 ` Donald Hunter [this message]
2026-02-23 9:40 ` Wouter Verhelst
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2fr6yl28j.fsf@gmail.com \
--to=donald.hunter@gmail.com \
--cc=axboe@kernel.dk \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=hristo@venev.name \
--cc=josef@toxicpanda.com \
--cc=kuba@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=nbd@other.debian.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.