[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZgWF/fIGXo/C1LSh@gmail.com>
Date: Thu, 28 Mar 2024 08:00:13 -0700
From: Breno Leitao <leitao@...ian.org>
To: Donald Hunter <donald.hunter@...il.com>
Cc: netdev@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Jiri Pirko <jiri@...nulli.us>,
Alessandro Marcolini <alessandromarcolini99@...il.com>,
donald.hunter@...hat.com
Subject: Re: [PATCH net-next v1 2/3] doc: netlink: Add hyperlinks to
generated Netlink docs
Hi Donald,
On Tue, Mar 26, 2024 at 08:13:10PM +0000, Donald Hunter wrote:
> Update ynl-gen-rst to generate hyperlinks to definitions, attribute
> sets and sub-messages from all the places that reference them.
>
> Note that there is a single label namespace for all of the kernel docs.
> Hyperlinks within a single netlink doc need to be qualified by the
> family name to avoid collisions.
>
> The label format is 'family-type-name' which gives, for example,
> 'rt-link-attribute-set-link-attrs' as the link id.
>
> Signed-off-by: Donald Hunter <donald.hunter@...il.com>
> ---
> tools/net/ynl/ynl-gen-rst.py | 44 +++++++++++++++++++++++++++---------
> 1 file changed, 33 insertions(+), 11 deletions(-)
>
> diff --git a/tools/net/ynl/ynl-gen-rst.py b/tools/net/ynl/ynl-gen-rst.py
> index 5825a8b3bfb4..4be931c9bdbf 100755
> --- a/tools/net/ynl/ynl-gen-rst.py
> +++ b/tools/net/ynl/ynl-gen-rst.py
> @@ -82,9 +82,9 @@ def rst_subsubsection(title: str) -> str:
> return f"{title}\n" + "~" * len(title)
>
>
> -def rst_section(title: str) -> str:
> +def rst_section(prefix: str, title: str) -> str:
> """Add a section to the document"""
> - return f"\n{title}\n" + "=" * len(title)
> + return f".. _{family}-{prefix}-{title}:\n\n{title}\n" + "=" * len(title)
Where is 'family' variable set? Is this a global variable somewhere?
Powered by blists - more mailing lists