From nobody Sun Dec 14 08:06:21 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 470AD8479; Mon, 28 Jul 2025 16:02:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753718542; cv=none; b=QimHIAUOPRt4Otsy+0I0AjV+mO4usCCkti35dh2Mrn6yfHQrSI6s5ERopOlBmLf+JodlFAYpwEosC8Vd1SYIVH/ETiFifZWGr8FN02CjAXEEsaOUh76q0DvbUDdGhGTuehEEtQ6hsoTHBGRViV9+b8OsiSZlfoT7XjJXI8n4g2g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753718542; c=relaxed/simple; bh=W4oDpda6kbCRnn0ODm8ONN7mKwlVwM/eB17fbg3mJL0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JWHVtkU7ibjzzAlpm6a67gUtkjgMWdwP04duli+4y038h6IgmI/vAkOLSjONZ/M4HxPi5Mpbgscczluc4u4vuvPO5k/RG/UdgTmTFuPIq50XbxjkLhjR17Nhh637C48AqxGfuIuWn0BfGw5EhIticeV0sArQCaUtBmfHuJBlutc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YGUD9hAc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YGUD9hAc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D335EC4CEE7; Mon, 28 Jul 2025 16:02:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753718541; bh=W4oDpda6kbCRnn0ODm8ONN7mKwlVwM/eB17fbg3mJL0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YGUD9hAcYppn4ft28tj0m5ByaI8tqR8IiAzQp8jMTNEipwnyGyfFjnFGAFxk4VhGR UV70rnp+dFLHE1K6J9wxPKnLzLAcI6pauVggFT32JOhc7cF7woqLkHw6C8+iz1YWHl OGmxh4jiRq3z5mbpgTV4qZzeCUxfuYaidLeo+0KpUh+MdsSitxwO1h5ykM2QmAIdrq H96V4xtELsYZk7AekMCUod8rLt2/yERc/TmK7FeZr48kTg97O8EBuB4JlAyxso4rax RJv4hHkVLc5RkwYtT/rjflhYcoD5kjmjOwhTg88LvnludwNI7CCLWNIhZynkgCYlXi S/uAYuejmqCfQ== Received: from mchehab by mail.kernel.org with local (Exim 4.98.2) (envelope-from ) id 1ugQIq-00000000Gch-0ygn; Mon, 28 Jul 2025 18:02:16 +0200 From: Mauro Carvalho Chehab To: "Message-ID :" , Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Akira Yokosawa" , "Breno Leitao" , "David S. Miller" , "Donald Hunter" , "Eric Dumazet" , "Ignacio Encinas Rubio" , "Jakub Kicinski" , "Jan Stancek" , "Jonathan Corbet" , "Marco Elver" , "Paolo Abeni" , "Randy Dunlap" , "Ruben Wauters" , "Shuah Khan" , "Simon Horman" , joel@joelfernandes.org, linux-kernel-mentees@lists.linux.dev, linux-kernel@vger.kernel.org, lkmm@lists.linux.dev, netdev@vger.kernel.org, peterz@infradead.org, stern@rowland.harvard.edu Subject: [PATCH v10 01/14] docs: netlink: netlink-raw.rst: use :ref: instead of :doc: Date: Mon, 28 Jul 2025 18:01:54 +0200 Message-ID: <1855229cf1ad7a8bdcab43423b5672f2fa55026f.1753718185.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" Currently, rt documents are referred with: Documentation/userspace-api/netlink/netlink-raw.rst: :doc:`rt-link<../../ne= tworking/netlink_spec/rt-link>` Documentation/userspace-api/netlink/netlink-raw.rst: :doc:`tc<../../network= ing/netlink_spec/tc>` Documentation/userspace-api/netlink/netlink-raw.rst: :doc:`tc<../../network= ing/netlink_spec/tc>` Having :doc: references with relative paths doesn't always work, as it may have troubles when O=3D is used. Also that's hard to maintain, and may break if we change the way rst files are generated from yaml. Better to use instead a reference for the netlink family. So, replace them by Sphinx cross-reference tag that are created by ynl_gen_rst.py. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Donald Hunter --- Documentation/userspace-api/netlink/netlink-raw.rst | 6 +++--- tools/net/ynl/pyynl/ynl_gen_rst.py | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Documentation/userspace-api/netlink/netlink-raw.rst b/Document= ation/userspace-api/netlink/netlink-raw.rst index 31fc91020eb3..aae296c170c5 100644 --- a/Documentation/userspace-api/netlink/netlink-raw.rst +++ b/Documentation/userspace-api/netlink/netlink-raw.rst @@ -62,8 +62,8 @@ Sub-messages ------------ =20 Several raw netlink families such as -:doc:`rt-link<../../networking/netlink_spec/rt-link>` and -:doc:`tc<../../networking/netlink_spec/tc>` use attribute nesting as an +:ref:`rt-link` and +:ref:`tc` use attribute nesting as an abstraction to carry module specific information. =20 Conceptually it looks as follows:: @@ -162,7 +162,7 @@ then this is an error. Nested struct definitions ------------------------- =20 -Many raw netlink families such as :doc:`tc<../../networking/netlink_spec/t= c>` +Many raw netlink families such as :ref:`tc` make use of nested struct definitions. The ``netlink-raw`` schema makes it possible to embed a struct within a struct definition using the ``struct`` property. For example, the following struct definition embeds the diff --git a/tools/net/ynl/pyynl/ynl_gen_rst.py b/tools/net/ynl/pyynl/ynl_g= en_rst.py index 0cb6348e28d3..7bfb8ceeeefc 100755 --- a/tools/net/ynl/pyynl/ynl_gen_rst.py +++ b/tools/net/ynl/pyynl/ynl_gen_rst.py @@ -314,10 +314,11 @@ def parse_yaml(obj: Dict[str, Any]) -> str: =20 # Main header =20 - lines.append(rst_header()) - family =3D obj['name'] =20 + lines.append(rst_header()) + lines.append(rst_label("netlink-" + family)) + title =3D f"Family ``{family}`` netlink specification" lines.append(rst_title(title)) lines.append(rst_paragraph(".. contents:: :depth: 3\n")) --=20 2.49.0