Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <leitao@debian.org>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20231129041427.2763074-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+11 -3
+3 -1
Documentation/userspace-api/netlink/index.rst
··· 16 16 genetlink-legacy 17 17 netlink-raw 18 18 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>`
+1 -1
Documentation/userspace-api/netlink/specs.rst
··· 15 15 Internally kernel uses the YAML specs to generate: 16 16 17 17 - 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>` 19 19 - policy tables for input attribute validation 20 20 - operation tables 21 21
+7 -1
tools/net/ynl/ynl-gen-rst.py
··· 122 122 return "\n".join(lines) 123 123 124 124 125 + def rst_label(title: str) -> str: 126 + """Return a formatted label""" 127 + return f".. _{title}:\n\n" 128 + 129 + 125 130 # Parsers 126 131 # ======= 127 132 ··· 354 349 lines = [] 355 350 356 351 lines.append(rst_header()) 357 - lines.append(rst_title("Netlink Specification")) 352 + lines.append(rst_label("specs")) 353 + lines.append(rst_title("Netlink Family Specifications")) 358 354 lines.append(rst_toctree(1)) 359 355 360 356 index_dir = os.path.dirname(output)