Skip to content

Commit e8c780a

Browse files
committed
docs: netlink: link to family documentations from spec info
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 <[email protected]> Reviewed-by: Donald Hunter <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 981239e commit e8c780a

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

Documentation/userspace-api/netlink/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ Netlink documentation for users.
1616
genetlink-legacy
1717
netlink-raw
1818

19-
See also :ref:`Documentation/core-api/netlink.rst <kernel_netlink>`.
19+
See also:
20+
- :ref:`Documentation/core-api/netlink.rst <kernel_netlink>`
21+
- :ref:`Documentation/networking/netlink_spec/index.rst <specs>`

Documentation/userspace-api/netlink/specs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ kernel headers directly.
1515
Internally kernel uses the YAML specs to generate:
1616

1717
- the C uAPI header
18-
- documentation of the protocol as a ReST file
18+
- documentation of the protocol as a ReST file - see :ref:`Documentation/networking/netlink_spec/index.rst <specs>`
1919
- policy tables for input attribute validation
2020
- operation tables
2121

tools/net/ynl/ynl-gen-rst.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ def rst_toctree(maxdepth: int = 2) -> str:
122122
return "\n".join(lines)
123123

124124

125+
def rst_label(title: str) -> str:
126+
"""Return a formatted label"""
127+
return f".. _{title}:\n\n"
128+
129+
125130
# Parsers
126131
# =======
127132

@@ -349,7 +354,8 @@ def generate_main_index_rst(output: str) -> None:
349354
lines = []
350355

351356
lines.append(rst_header())
352-
lines.append(rst_title("Netlink Specification"))
357+
lines.append(rst_label("specs"))
358+
lines.append(rst_title("Netlink Family Specifications"))
353359
lines.append(rst_toctree(1))
354360

355361
index_dir = os.path.dirname(output)

0 commit comments

Comments
 (0)