From nobody Wed Oct 8 17:34:02 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 A25272882AF; Thu, 26 Jun 2025 08:13:53 +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=1750925633; cv=none; b=JT2n1PlRzEjwJj4ohFhvCM6xqmhL3zF1IaQoVjxf0umdjXM4aNsQaytMdwA/tqhluwy6E/jU73AcW9cuCvY1P5vVh05ZD2b95+vDIdF+gfh2U2Q0WqM4TQS6PdVRkM9NmCOAdS9xUseuuNiN+b7msx4aLWu22JO2xZ/synLvaBY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750925633; c=relaxed/simple; bh=W4oDpda6kbCRnn0ODm8ONN7mKwlVwM/eB17fbg3mJL0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CcG553tPn2exMFN5sGRyfkKHyXcx9GiCuBc4O5PeZq7ueJcPrYJwsti7wrrzuURWfEyr6FihFBc5yUpnuK4IMvw+zOAjDg2qfGn9GTy89OaIoXk/g/MCEOW40Wg3m7LoQKgoetagfITYGUmeCWRgFiFP1jCffjI06qj6e8K/Ju0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CaYdgaWi; 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="CaYdgaWi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CA78C4CEEB; Thu, 26 Jun 2025 08:13:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750925633; bh=W4oDpda6kbCRnn0ODm8ONN7mKwlVwM/eB17fbg3mJL0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CaYdgaWik9bFdu0z+vx0dF0aqIOWDHG1ysP+p8jo2Sw9Hh3E+DslnNhfAs+8NZRu/ vV7rKGEufR24kXq4YyObjOgIkOrD6BMRKpEra+O3aATudLLX6wUZ51Nho/pIdMStTR WP8Y34JAyFTyjQBk+B71V+V7ec508Py7xB8VssSMxhI6y6Oynr2KU5ksCwWpQQQdxm fxroUjbQRtANPNDhBuwtNqF47caJmgrsGWC/uK2y6GxIYPiaqIT/yPmEqA850zCLX1 D/5QzsdJGFrYpKK0UvjC/2MmVRK5D13dWcIqRQU02z3FnNBu+TJGC58TwfnWDzVl4d pQfRDgzRSVZaQ== Received: from mchehab by mail.kernel.org with local (Exim 4.98.2) (envelope-from ) id 1uUhjT-00000004svT-0va0; Thu, 26 Jun 2025 10:13:19 +0200 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet Cc: Mauro Carvalho Chehab , "Akira Yokosawa" , "Breno Leitao" , "David S. Miller" , "Donald Hunter" , "Eric Dumazet" , "Ignacio Encinas Rubio" , "Jan Stancek" , "Marco Elver" , "Mauro Carvalho Chehab" , "Paolo Abeni" , "Randy Dunlap" , "Ruben Wauters" , "Shuah Khan" , Jakub Kicinski , 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 v8 01/13] docs: netlink: netlink-raw.rst: use :ref: instead of :doc: Date: Thu, 26 Jun 2025 10:12:57 +0200 Message-ID: <30cc47a21b1377c2ec59c6c45b5604afcd8ff5f9.1750925410.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