From: Donald Hunter <donald.hunter@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
edumazet@google.com, pabeni@redhat.com, corbet@lwn.net,
leitao@debian.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH net-next] docs: netlink: link to family documentations from spec info
Date: Tue, 28 Nov 2023 10:21:30 +0000 [thread overview]
Message-ID: <m2leai89g5.fsf@gmail.com> (raw)
In-Reply-To: <20231127205642.2293153-1-kuba@kernel.org> (Jakub Kicinski's message of "Mon, 27 Nov 2023 12:56:42 -0800")
Jakub Kicinski <kuba@kernel.org> writes:
> To increase the chances of people finding the rendered docs
> add a link to specs.rst. Add a label in the generated index.rst
> and while at it adjust the title a little bit.
It might be useful to also link to the rendered docs directly from the
"Netlink Handbook" at Documentation/userspace-api/netlink/index.rst?
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: corbet@lwn.net
> CC: leitao@debian.org
> CC: linux-doc@vger.kernel.org
> ---
> Documentation/userspace-api/netlink/specs.rst | 2 +-
> tools/net/ynl/ynl-gen-rst.py | 8 +++++++-
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/userspace-api/netlink/specs.rst b/Documentation/userspace-api/netlink/specs.rst
> index c1b951649113..1b50d97d8d7c 100644
> --- a/Documentation/userspace-api/netlink/specs.rst
> +++ b/Documentation/userspace-api/netlink/specs.rst
> @@ -15,7 +15,7 @@ kernel headers directly.
> Internally kernel uses the YAML specs to generate:
>
> - the C uAPI header
> - - documentation of the protocol as a ReST file
> + - documentation of the protocol as a ReST file - see :ref:`Documentation/networking/netlink_spec/index.rst <specs>`
> - policy tables for input attribute validation
> - operation tables
>
> diff --git a/tools/net/ynl/ynl-gen-rst.py b/tools/net/ynl/ynl-gen-rst.py
> index b6292109e236..2c0b80071bcd 100755
> --- a/tools/net/ynl/ynl-gen-rst.py
> +++ b/tools/net/ynl/ynl-gen-rst.py
> @@ -122,6 +122,11 @@ SPACE_PER_LEVEL = 4
> return "\n".join(lines)
>
>
> +def rst_label(title) -> str:
> + """Return a formatted label"""
> + return f".. _{title}:\n\n"
> +
> +
> # Parsers
> # =======
>
> @@ -349,7 +354,8 @@ SPACE_PER_LEVEL = 4
> lines = []
>
> lines.append(rst_header())
> - lines.append(rst_title("Netlink Specification"))
> + lines.append(rst_label("specs"))
> + lines.append(rst_title("Netlink Family Specifications"))
> lines.append(rst_toctree(1))
>
> index_dir = os.path.dirname(output)
prev parent reply other threads:[~2023-11-28 10:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-27 20:56 [PATCH net-next] docs: netlink: link to family documentations from spec info Jakub Kicinski
2023-11-28 3:01 ` kernel test robot
2023-11-28 3:06 ` Jakub Kicinski
2023-11-30 8:52 ` Yujie Liu
2023-11-30 15:05 ` Jakub Kicinski
2023-11-28 9:39 ` Breno Leitao
2023-11-28 10:21 ` Donald Hunter [this message]
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=m2leai89g5.fsf@gmail.com \
--to=donald.hunter@gmail.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=linux-doc@vger.kernel.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.