From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Breno Leitao <leitao@debian.org>,
Linux Doc Mailing List <linux-doc@vger.kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Akira Yokosawa <akiyks@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Ignacio Encinas Rubio <ignacio@iencinas.com>,
Marco Elver <elver@google.com>,
Shuah Khan <skhan@linuxfoundation.org>,
Donald Hunter <donald.hunter@gmail.com>,
Eric Dumazet <edumazet@google.com>,
Jan Stancek <jstancek@redhat.com>,
Paolo Abeni <pabeni@redhat.com>,
Ruben Wauters <rubenru09@aol.com>,
joel@joelfernandes.org, linux-kernel-mentees@lists.linux.dev,
linux-kernel@vger.kernel.org, lkmm@lists.linux.dev,
netdev@vger.kernel.org, peterz@infradead.org,
stern@rowland.harvard.edu
Subject: Re: [PATCH 4/4] docs: netlink: store generated .rst files at Documentation/output
Date: Thu, 12 Jun 2025 16:39:05 +0200 [thread overview]
Message-ID: <20250612163905.119c2b5e@sal.lan> (raw)
In-Reply-To: <20250610140724.5f183759@kernel.org>
Em Tue, 10 Jun 2025 14:07:24 -0700
Jakub Kicinski <kuba@kernel.org> escreveu:
> On Tue, 10 Jun 2025 22:59:11 +0200 Mauro Carvalho Chehab wrote:
> > > The question is, are we OK with the templates that need to be created
> > > for netlink specs?!
> >
> > If there's no other way, one might have a tool for maintainers to use
> > to update templates, but yeah, having one template per each yaml
> > is not ideal. I think we need to investigate it better and seek for
> > some alternatives to avoid it.
>
> FWIW we have tools/net/ynl/ynl-regen.sh, it regenerates the C code
> we have committed in the tree (uAPI headers mostly).
> We could add it there. Which is not to distract from your main
> point that not having the templates would be ideal.
With the new Sphinx extension for netlink specs I posted:
https://lore.kernel.org/linux-doc/cover.1749723671.git.mchehab+huawei@kernel.org/T/#t
https://lore.kernel.org/linux-doc/20250612142438.MED5SEN3C-3RDQI5I1ELC-u8QJEjH8W4vUQRBdyK1tI@z/T/#t
There's no need for a template for each file, although it does require
updating Documentation/netlink/specs/index.rst. There are a couple
of reasons:
1. on my tests, I got some errors auto-generating it while
using:
make SPHINXDIRS="networking netlink" htmldocs
2. a dynamically-generated file will cause a extra
warnings at the userspace files that contain the name of the
netlink spec index.html. Basically, kernel build runs a script
which validates that all files under Documentation/ actually
exist
3. adding/renaming files typically require changing
MAINTAINERS and/or Makefiles. Updating index.rst
accordingly is already expected for documentation.
In any case, as I didn't drop the existing script, you could add a
call inside tools/net/ynl/ynl-regen.sh to:
tools/net/ynl/pyynl/ynl_gen_rst.py -x -v -o Documentation/netlink/specs/index.rst
To ensure that nobody would forget updating it.
Regards,
Mauro
next prev parent reply other threads:[~2025-06-12 14:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-10 10:46 [PATCH 0/4] Don't generate netlink .rst files inside $(srctree) Mauro Carvalho Chehab
2025-06-10 10:46 ` [PATCH 1/4] tools: ynl_gen_rst.py: create a top-level reference Mauro Carvalho Chehab
2025-06-10 10:46 ` [PATCH 2/4] docs: netlink: netlink-raw.rst: use :ref: instead of :doc: Mauro Carvalho Chehab
2025-06-10 10:46 ` [PATCH 3/4] docs: netlink: don't ignore generated rst files Mauro Carvalho Chehab
2025-06-11 10:44 ` Donald Hunter
2025-06-10 10:46 ` [PATCH 4/4] docs: netlink: store generated .rst files at Documentation/output Mauro Carvalho Chehab
2025-06-10 15:43 ` Breno Leitao
2025-06-10 20:59 ` Mauro Carvalho Chehab
2025-06-10 21:07 ` Jakub Kicinski
2025-06-12 14:39 ` Mauro Carvalho Chehab [this message]
2025-06-11 15:45 ` Mauro Carvalho Chehab
2025-06-11 15:55 ` Breno Leitao
2025-06-12 10:22 ` Mauro Carvalho Chehab
2025-06-11 11:36 ` Donald Hunter
2025-06-11 16:10 ` Mauro Carvalho Chehab
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=20250612163905.119c2b5e@sal.lan \
--to=mchehab+huawei@kernel.org \
--cc=akiyks@gmail.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=elver@google.com \
--cc=ignacio@iencinas.com \
--cc=joel@joelfernandes.org \
--cc=jstancek@redhat.com \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=lkmm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=peterz@infradead.org \
--cc=rubenru09@aol.com \
--cc=skhan@linuxfoundation.org \
--cc=stern@rowland.harvard.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).