[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250614173235.7374027a@foz.lan>
Date: Sat, 14 Jun 2025 17:32:35 +0200
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Donald Hunter <donald.hunter@...il.com>, Jonathan Corbet
<corbet@....net>
Cc: Linux Doc Mailing List <linux-doc@...r.kernel.org>, Akira Yokosawa
<akiyks@...il.com>, Breno Leitao <leitao@...ian.org>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Ignacio Encinas
Rubio <ignacio@...cinas.com>, Jan Stancek <jstancek@...hat.com>, Marco
Elver <elver@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Ruben Wauters
<rubenru09@....com>, Shuah Khan <skhan@...uxfoundation.org>,
joel@...lfernandes.org, linux-kernel-mentees@...ts.linux.dev,
linux-kernel@...r.kernel.org, lkmm@...ts.linux.dev, netdev@...r.kernel.org,
peterz@...radead.org, stern@...land.harvard.edu
Subject: Re: [PATCH v4 12/14] MAINTAINERS: add maintainers for
netlink_yml_parser.py
Hi Donald, Jon,
Em Sat, 14 Jun 2025 15:22:16 +0100
Donald Hunter <donald.hunter@...il.com> escreveu:
> On Sat, 14 Jun 2025 at 09:56, Mauro Carvalho Chehab
> <mchehab+huawei@...nel.org> wrote:
> >
> > The parsing code from tools/net/ynl/pyynl/ynl_gen_rst.py was moved
> > to scripts/lib/netlink_yml_parser.py. Its maintainership
> > is done by Netlink maintainers. Yet, as it is used by Sphinx
> > build system, add it also to linux-doc maintainers, as changes
> > there might affect documentation builds. So, linux-docs ML
> > should ideally be C/C on changes to it.
>
> This patch can be dropped from the series when you move the library
> code to tools/net/ynl/pyynl/lib.
>
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
> > ---
> > MAINTAINERS | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index a92290fffa16..2c0b13e5d8fc 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -7202,6 +7202,7 @@ F: scripts/get_abi.py
> > F: scripts/kernel-doc*
> > F: scripts/lib/abi/*
> > F: scripts/lib/kdoc/*
> > +F: scripts/lib/netlink_yml_parser.py
> > F: scripts/sphinx-pre-install
> > X: Documentation/ABI/
> > X: Documentation/admin-guide/media/
Adding an entry that would c/c to linux-doc for the parser is
important, as problems there will affect documentation build,
no matter where it is located. Perhaps one option would be to
create a separate MAINTAINERS entry for it, like:
YAML NETLINK (YNL) DOC GENERATOR
M: Donald Hunter <donald.hunter@...il.com>
M: Jakub Kicinski <kuba@...nel.org>
F: <python_lib_location>/netlink_yml_parser.py
L: linux-doc@...r.kernel.org
to ensure that changes to it would be C/C to linux-doc.
> > @@ -27314,6 +27315,7 @@ M: Jakub Kicinski <kuba@...nel.org>
> > F: Documentation/netlink/
> > F: Documentation/userspace-api/netlink/intro-specs.rst
> > F: Documentation/userspace-api/netlink/specs.rst
> > +F: scripts/lib/netlink_yml_parser.py
> > F: tools/net/ynl/
With regards to the location itself, as I said earlier, it is up to
Jon and you to decide.
My preference is to have all Python libraries at the entire Kernel
inside scripts/lib (or at some other common location), no matter where
the caller Python command or in-kernel Sphinx extensions are located.
There is also slight advantage on placing them at the same location:
if we end adding parsers for other subsystems at parse_html.py, having
all of them at the same directory means we don't need to do something
like:
lib_paths = [
"tools/net/ynl/pyynl/lib",
"foo",
"bar",
...
]
for d in lib_paths:
sys.path.insert(0, os.path.join(srctree, "scripts/lib"))
from netlink_yml_parser import YnlDocGenerator # pylint: disable=C0413
from foo_yml_parser import FooYamlDocGenerator # pylint: disable=C0413
from bar_yml_parser import BarYamlDocGenerator # pylint: disable=C0413
...
Thanks,
Mauro
Powered by blists - more mailing lists