From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
Jakub Kicinski <kuba@kernel.org>,
Breno Leitao <leitao@debian.org>,
Donald Hunter <donald.hunter@gmail.com>,
corbet@lwn.net, linux-doc@vger.kernel.org
Subject: [PATCH net-next v2] docs: netlink: link to family documentations from spec info
Date: Tue, 28 Nov 2023 20:14:27 -0800 [thread overview]
Message-ID: <20231129041427.2763074-1-kuba@kernel.org> (raw)
To increase the chances of people finding the rendered docs
add a link to specs.rst and index.rst.
Add a label in the generated index.rst and while at it adjust
the title a little bit.
Reviewed-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
v2:
- add type to the arg
- link from index
v1: https://lore.kernel.org/all/20231127205642.2293153-1-kuba@kernel.org/
CC: corbet@lwn.net
CC: linux-doc@vger.kernel.org
---
Documentation/userspace-api/netlink/index.rst | 4 +++-
Documentation/userspace-api/netlink/specs.rst | 2 +-
tools/net/ynl/ynl-gen-rst.py | 8 +++++++-
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/Documentation/userspace-api/netlink/index.rst b/Documentation/userspace-api/netlink/index.rst
index 62725dafbbdb..c1b6765cc963 100644
--- a/Documentation/userspace-api/netlink/index.rst
+++ b/Documentation/userspace-api/netlink/index.rst
@@ -16,4 +16,6 @@ Netlink documentation for users.
genetlink-legacy
netlink-raw
-See also :ref:`Documentation/core-api/netlink.rst <kernel_netlink>`.
+See also:
+ - :ref:`Documentation/core-api/netlink.rst <kernel_netlink>`
+ - :ref:`Documentation/networking/netlink_spec/index.rst <specs>`
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..8c62e040df5d 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) -> 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)
--
2.43.0
next reply other threads:[~2023-11-29 4:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-29 4:14 Jakub Kicinski [this message]
2023-11-29 14:47 ` [PATCH net-next v2] docs: netlink: link to family documentations from spec info Jiri Pirko
2023-12-01 7:20 ` patchwork-bot+netdevbpf
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=20231129041427.2763074-1-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--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 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).