From patchwork Fri Mar 29 13:50:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Donald Hunter X-Patchwork-Id: 13610633 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7C49139D00 for ; Fri, 29 Mar 2024 13:50:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711720231; cv=none; b=ZE5qfYT25aGz9ezgE/ESA5jrcJI4cq2irhVkKpx0PCqXicjIkbn7KGU84wkK2YrzciCFfn6klD6asONbUrGnMj4XucCl5eI+rlDueGfTFZBA0IdpKZIpeaKWkpppys166dGkdyqL34fap1Z2yvph2WhwIK2obOZsramtAoO12Cw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711720231; c=relaxed/simple; bh=yrwOh+QBerZG+x69Hbd/5g3E6bkIyh9W3lC1eVjZ3h8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=retncdPeH2xJj3CXkHK8OvKcPCmOFySTTP099/DmJSqsyItbDK90crGmJJr25946eRzNNK0qWRNOXrlYa2T92nYfX2KKFzCVul5NIqW1NYC5SseGv8QuIWdQKAqdUIiXunuGQVTZ4kI4GTBtWX8wVnWgMPwVFnKboAzy/UoROHU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nRuQYicx; arc=none smtp.client-ip=209.85.208.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nRuQYicx" Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2d094bc2244so21582191fa.1 for ; Fri, 29 Mar 2024 06:50:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711720227; x=1712325027; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AMkki4A/Vj7KhowkYLIWUYp+Nt56+Jptyl5JQbMrydA=; b=nRuQYicxCskGuNoo7k3g+GWf6Cz+CAGX6BdFULuLV8t9UYYDQFniXHjvtROQ/kjKp5 OdjJp5TxBzXpQ88tOFeXLauwmlK9n+bDyL0Wg1t4nsVerzej1HCoGR2WmTYT3bzT/szX XooUfat7RzUE+3sebSa66NbWmtjrauaDusv5b4l4cuIOQ0IWRqyjyArCG7fa4K7Hy/y4 si9Y1QdIQZDWHsFVJkGLOpuohz+G13Q/KElVoIrCNnvzxjmtB9dMVfshD9+j+XRi4kdc YrV1HJEXyx9XMfnn/TwHBpP+RtaAMMb/YTge9+tiGPu6mk5DBhZiuu6MlAhk9kGCSh8v N3lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711720227; x=1712325027; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AMkki4A/Vj7KhowkYLIWUYp+Nt56+Jptyl5JQbMrydA=; b=EwpznKtG14BRd2tN1yMDpXGTj2z0zkbJqyLMSOxrZ9PV5IKeZkV2gRQDqZLcq5gu6H u4AOV210CLcY11JTEEiPuVQK4a1RTzzloAA8L4DBp7f20LN70gnalimyK9+JeHipcDJ0 G52czgNZm6gpiiERCclzMHNhhk9EySaFj5OIL99tq8c47xnV54ZFiZSACHTgY67zOpab CslHXHk0K5rynJJU3HBr6dDoT4WTbJuJCR03N1dpbs4u6ptr0MWXcYOd6763a5SQx1KV 6+lWd9P7sCvdtESc8Uq+80pqD7mQ+vhaw/Pn77GMDzG/Hw8RXYH9i1QLkP1CLa7OjpJR +Lrg== X-Gm-Message-State: AOJu0YzCL7BXHMxLMmg4Hhd6ll7Fub2ay3138DWPJGEuz9EbHI3m01KM 0T9iFGsRt3Ll6GxNFzswJMqQtIxH9BuS6V92aoLTWRGgxywkddh7MKPhVM7rBEQ= X-Google-Smtp-Source: AGHT+IEYDHtKgFom+uJiYKSUZGXAuOxgFydYDvgE2X1BfUQ1cWnCd6+tKg+0XkhG99Ik241cbRnE6Q== X-Received: by 2002:a2e:804a:0:b0:2d2:6193:6d53 with SMTP id p10-20020a2e804a000000b002d261936d53mr1369789ljg.13.1711720227281; Fri, 29 Mar 2024 06:50:27 -0700 (PDT) Received: from imac.fritz.box ([2a02:8010:60a0:0:3c9d:7a51:4242:88e2]) by smtp.gmail.com with ESMTPSA id s21-20020a05600c45d500b0041487f70d9fsm8590633wmo.21.2024.03.29.06.50.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 06:50:26 -0700 (PDT) From: Donald Hunter To: netdev@vger.kernel.org, Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , Jiri Pirko , Breno Leitao , Alessandro Marcolini Cc: donald.hunter@redhat.com, Donald Hunter Subject: [PATCH net-next v2 1/3] doc: netlink: Change generated docs to limit TOC to depth 3 Date: Fri, 29 Mar 2024 13:50:19 +0000 Message-ID: <20240329135021.52534-2-donald.hunter@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240329135021.52534-1-donald.hunter@gmail.com> References: <20240329135021.52534-1-donald.hunter@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org The tables of contents in the generated Netlink docs include individual attribute definitions. This can make the contents exceedingly long and repeats a lot of what is on the rest of the pages. See for example: https://docs.kernel.org/networking/netlink_spec/tc.html Add a depth limit to the contents directive in generated .rst files to limit the contents depth to 3 levels. This reduces the contents to: - Family - Summary - Operations - op-one - op-two - ... - Definitions - struct-one - struct-two - enum-one - ... - Attribute sets - attrs-one - attrs-two - ... Signed-off-by: Donald Hunter Reviewed-by: Breno Leitao --- tools/net/ynl/ynl-gen-rst.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/net/ynl/ynl-gen-rst.py b/tools/net/ynl/ynl-gen-rst.py index 927407b3efb3..5825a8b3bfb4 100755 --- a/tools/net/ynl/ynl-gen-rst.py +++ b/tools/net/ynl/ynl-gen-rst.py @@ -291,7 +291,7 @@ def parse_yaml(obj: Dict[str, Any]) -> str: title = f"Family ``{obj['name']}`` netlink specification" lines.append(rst_title(title)) - lines.append(rst_paragraph(".. contents::\n")) + lines.append(rst_paragraph(".. contents:: :depth: 3\n")) if "doc" in obj: lines.append(rst_subtitle("Summary")) From patchwork Fri Mar 29 13:50:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Donald Hunter X-Patchwork-Id: 13610634 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D22AB1C0DF1 for ; Fri, 29 Mar 2024 13:50:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711720233; cv=none; b=a054nCSEwjrNuE4ikbRnj2J9zirTFBf62cgTzQrH/YBRx3mMrRqKHssr9/WD4oZ/5Lfl7YPxraXL4I4XtGCRCJBNxm7AFXEZUw7fCPOD82SyWa1QhFGQ91ZvaxU+PeEktP4wf8CUGnKXnvYPV2MMTzqH2JGKTL6PAlI8YvdOI4Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711720233; c=relaxed/simple; bh=s+0RIk8awyxwFk+qhi/qIw1OJwGO5Q6PrjhYmwmfsIQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=noT4lyIePHTKkepMGMP4oMC9zO3Lcg+1wSNxsips6kHX1lbMIs5s+NLjrNlPcA7tp5Kfw2MQZP0FVes4x34AZbAMXH83W3PgzWh94wbr+OFMNT5N0TcrH4g02zAs7SQbvJIPcP5SBZK/sfgOr23xsLeYH/5Pli/2es/G5oLzEVU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Qlv6xyMk; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Qlv6xyMk" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4154464f150so9659795e9.0 for ; Fri, 29 Mar 2024 06:50:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711720229; x=1712325029; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8UxhgUnaWx0Bx7zKrT6M6C3uLGshHFUXni3kBGNYqrU=; b=Qlv6xyMkt8YEsfHzhdKosA4okV/ht7Rim88G7vPSkM8gGNeztHGVVXAnK4TEMLMzfI vvOPxQ8klo40ifgoHVvwVjWi2VnQhgpyOdH/+o9yNSLwKdpu6xDGHyldrJ8feep8VzpM 59XUYhWT2tjlMaTH3sqQrjisAMg776TVacNRcDs2gstYsA6k8IisMluHm8aGNgurnRty HUDSBnnuB28cqz+RjF6358yx19uHrQlrAf+7b6VEzwGPiPPXapNkmhs6msO8RqvLpSem Nk820gtqEKt76TLjXjgmq8LEljq6zwfajbMR++Ps7+FAGPpQ8f1/U3R2MPmJoVc8a/3f wL4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711720229; x=1712325029; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8UxhgUnaWx0Bx7zKrT6M6C3uLGshHFUXni3kBGNYqrU=; b=bDXKvxoF+cfcfALx7WVcF59f2mFPDx/oRQocrfp0ReB8UdEvSwnZK38ClRhkSuOntD nXqhUElmy9M362yx3CXE4wO2YNoH5dQkmhvoq4j3p043bWaI4X/P0J3RtC28u6yVdZqp y7G33LMLmnMc64WRolDfU7gzVY4uRsbG0KLtaQ6TIrPzRP9vvbxQnzwo/IbxD0SZzwdY RLPoP/A2U1q9Rtuluy8Dpv5XSvOFfumaIcZHcglZwKUJYipE1qqsGkTwosyLhRwZHBmG DJBmWv669CdQIruv9199HjlzBx3qxGFiFnP+xJitG5UlwUGIPhucb2jw7i7DeqtRrlzS sLKA== X-Gm-Message-State: AOJu0Ywlpnk+spVMVQbfQ7QRMc0oAK3Jp+17uHgOKG+Kuo7B6f4bcUnz jg01WHjGAH/RlBnZAXR7MIlElcX0yS+bXPosWlYsj5vexxc9jwEXZx+tv3NUVgg= X-Google-Smtp-Source: AGHT+IE0VfEtOlvoRwZzUzGYtOQ5m+vUwECq0a/1L/C2Orx8MKejzWFw9IH7PvQ/tCsiYkCqfwqugg== X-Received: by 2002:a05:600c:4509:b0:414:89c7:c0af with SMTP id t9-20020a05600c450900b0041489c7c0afmr4868406wmo.13.1711720228642; Fri, 29 Mar 2024 06:50:28 -0700 (PDT) Received: from imac.fritz.box ([2a02:8010:60a0:0:3c9d:7a51:4242:88e2]) by smtp.gmail.com with ESMTPSA id s21-20020a05600c45d500b0041487f70d9fsm8590633wmo.21.2024.03.29.06.50.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 06:50:27 -0700 (PDT) From: Donald Hunter To: netdev@vger.kernel.org, Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , Jiri Pirko , Breno Leitao , Alessandro Marcolini Cc: donald.hunter@redhat.com, Donald Hunter Subject: [PATCH net-next v2 2/3] doc: netlink: Add hyperlinks to generated Netlink docs Date: Fri, 29 Mar 2024 13:50:20 +0000 Message-ID: <20240329135021.52534-3-donald.hunter@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240329135021.52534-1-donald.hunter@gmail.com> References: <20240329135021.52534-1-donald.hunter@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org 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 --- tools/net/ynl/ynl-gen-rst.py | 60 +++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 18 deletions(-) diff --git a/tools/net/ynl/ynl-gen-rst.py b/tools/net/ynl/ynl-gen-rst.py index 5825a8b3bfb4..657e881d2ea4 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(namespace: str, prefix: str, title: str) -> str: """Add a section to the document""" - return f"\n{title}\n" + "=" * len(title) + return f".. _{namespace}-{prefix}-{title}:\n\n{title}\n" + "=" * len(title) def rst_subtitle(title: str) -> str: @@ -102,6 +102,17 @@ def rst_list_inline(list_: List[str], level: int = 0) -> str: return headroom(level) + "[" + ", ".join(inline(i) for i in list_) + "]" +def rst_ref(namespace: str, prefix: str, name: str) -> str: + """Add a hyperlink to the document""" + mappings = {'enum': 'definition', + 'fixed-header': 'definition', + 'nested-attributes': 'attribute-set', + 'struct': 'definition'} + if prefix in mappings: + prefix = mappings[prefix] + return f":ref:`{namespace}-{prefix}-{name}`" + + def rst_header() -> str: """The headers for all the auto generated RST files""" lines = [] @@ -159,20 +170,24 @@ def parse_do_attributes(attrs: Dict[str, Any], level: int = 0) -> str: return "\n".join(lines) -def parse_operations(operations: List[Dict[str, Any]]) -> str: +def parse_operations(operations: List[Dict[str, Any]], namespace: str) -> str: """Parse operations block""" preprocessed = ["name", "doc", "title", "do", "dump"] + linkable = ["fixed-header", "attribute-set"] lines = [] for operation in operations: - lines.append(rst_section(operation["name"])) + lines.append(rst_section(namespace, 'operation', operation["name"])) lines.append(rst_paragraph(sanitize(operation["doc"])) + "\n") for key in operation.keys(): if key in preprocessed: # Skip the special fields continue - lines.append(rst_fields(key, operation[key], 0)) + value = operation[key] + if key in linkable: + value = rst_ref(namespace, key, value) + lines.append(rst_fields(key, value, 0)) if "do" in operation: lines.append(rst_paragraph(":do:", 0)) @@ -212,14 +227,14 @@ def parse_entries(entries: List[Dict[str, Any]], level: int) -> str: return "\n".join(lines) -def parse_definitions(defs: Dict[str, Any]) -> str: +def parse_definitions(defs: Dict[str, Any], namespace: str) -> str: """Parse definitions section""" preprocessed = ["name", "entries", "members"] ignored = ["render-max"] # This is not printed lines = [] for definition in defs: - lines.append(rst_section(definition["name"])) + lines.append(rst_section(namespace, 'definition', definition["name"])) for k in definition.keys(): if k in preprocessed + ignored: continue @@ -237,14 +252,15 @@ def parse_definitions(defs: Dict[str, Any]) -> str: return "\n".join(lines) -def parse_attr_sets(entries: List[Dict[str, Any]]) -> str: +def parse_attr_sets(entries: List[Dict[str, Any]], namespace: str) -> str: """Parse attribute from attribute-set""" preprocessed = ["name", "type"] + linkable = ["enum", "nested-attributes", "struct", "sub-message"] ignored = ["checks"] lines = [] for entry in entries: - lines.append(rst_section(entry["name"])) + lines.append(rst_section(namespace, 'attribute-set', entry["name"])) for attr in entry["attributes"]: type_ = attr.get("type") attr_line = attr["name"] @@ -257,25 +273,31 @@ def parse_attr_sets(entries: List[Dict[str, Any]]) -> str: for k in attr.keys(): if k in preprocessed + ignored: continue - lines.append(rst_fields(k, sanitize(attr[k]), 0)) + if k in linkable: + value = rst_ref(namespace, k, attr[k]) + else: + value = sanitize(attr[k]) + lines.append(rst_fields(k, value, 0)) lines.append("\n") return "\n".join(lines) -def parse_sub_messages(entries: List[Dict[str, Any]]) -> str: +def parse_sub_messages(entries: List[Dict[str, Any]], namespace: str) -> str: """Parse sub-message definitions""" lines = [] for entry in entries: - lines.append(rst_section(entry["name"])) + lines.append(rst_section(namespace, 'sub-message', entry["name"])) for fmt in entry["formats"]: value = fmt["value"] lines.append(rst_bullet(bold(value))) for attr in ['fixed-header', 'attribute-set']: if attr in fmt: - lines.append(rst_fields(attr, fmt[attr], 1)) + lines.append(rst_fields(attr, + rst_ref(namespace, attr, fmt[attr]), + 1)) lines.append("\n") return "\n".join(lines) @@ -289,7 +311,9 @@ def parse_yaml(obj: Dict[str, Any]) -> str: lines.append(rst_header()) - title = f"Family ``{obj['name']}`` netlink specification" + family = obj['name'] + + title = f"Family ``{family}`` netlink specification" lines.append(rst_title(title)) lines.append(rst_paragraph(".. contents:: :depth: 3\n")) @@ -300,7 +324,7 @@ def parse_yaml(obj: Dict[str, Any]) -> str: # Operations if "operations" in obj: lines.append(rst_subtitle("Operations")) - lines.append(parse_operations(obj["operations"]["list"])) + lines.append(parse_operations(obj["operations"]["list"], family)) # Multicast groups if "mcast-groups" in obj: @@ -310,17 +334,17 @@ def parse_yaml(obj: Dict[str, Any]) -> str: # Definitions if "definitions" in obj: lines.append(rst_subtitle("Definitions")) - lines.append(parse_definitions(obj["definitions"])) + lines.append(parse_definitions(obj["definitions"], family)) # Attributes set if "attribute-sets" in obj: lines.append(rst_subtitle("Attribute sets")) - lines.append(parse_attr_sets(obj["attribute-sets"])) + lines.append(parse_attr_sets(obj["attribute-sets"], family)) # Sub-messages if "sub-messages" in obj: lines.append(rst_subtitle("Sub-messages")) - lines.append(parse_sub_messages(obj["sub-messages"])) + lines.append(parse_sub_messages(obj["sub-messages"], family)) return "\n".join(lines) From patchwork Fri Mar 29 13:50:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Donald Hunter X-Patchwork-Id: 13610635 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4752B146012 for ; Fri, 29 Mar 2024 13:50:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711720234; cv=none; b=TzAHvFy+mjN6utceKWyb4/4i+aSQq9Sb0+Benglf8Gvuigxb+IgHaAUJvqBvxU02TIV5xt/g93VH8NtIsN5yKcqZgBsVoxOtUCi+mNZT8LcyYQVbD7ZG9vv/nq8UOKRoUzz7sfQglJ4xK1HPpriMYoCZ6yYOpH8HcBL5xGc04cQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711720234; c=relaxed/simple; bh=BmPUv/muxh2IWtSQ2/h2reshEnJ78rACDCkeTIwQEQw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uKJ86y1x6Pv5+za/YllCpRNUngkcaR++p5VlTo56/6EX/3UEpbfu9Xrn8ueY0zqk48IMlhL4Q23VDkdaz5b1ARfjbYri326gCFHjrY6fbcXJ+06NFK8OgcG6FS83SJXXejKNB4cieQbY0KZ2VDwKnce2RjzaAVHG6XA2yKIMM4c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=l5Qyum7U; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="l5Qyum7U" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-415482307b0so12891415e9.0 for ; Fri, 29 Mar 2024 06:50:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711720230; x=1712325030; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fkxeyeZNwA9yc/AStPRrWALMQsfLa6sZyGKQd1e3u7M=; b=l5Qyum7UkDoKxkh744zWPt92G5d8jkMR0tRIBYF7qXhuN/5S+nyGbibmdQNYEikaQ5 7Pic6kcrXZcyEdC6aEYd8JKpsfYtEw9YMdFxdCAVX2yRbzSOH98cI78HJ3qjleoicSvg HU6TTBk0L8ndLGrIYsHKu/0u+EUN6ZW+UCm6SOgddCZaQYTpO3fR4o/OLvblUTk+DQax +LGcK9GEQH8JVJOEeyRKaBzVt/gF8dlXjEsUUIpJ2KmOcsCbLFWTYmmVhxc5tFd6a+9a DVkM1i+DvGc0GX1U7YJaXwllTGrcpL3mRsBccuSwae+OkpyjcBfVdmujWI1r5vYeXuwE OSzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711720230; x=1712325030; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fkxeyeZNwA9yc/AStPRrWALMQsfLa6sZyGKQd1e3u7M=; b=TuKA6+xcLUEAjuMet1RYgYEiEVbmgq5tLaNx3/Qxf89gsOgUnTr+3tINAkLL3vmjU3 OVWE0Bwsk5Y7FsbNHgu68/5B+1cbzVVyiCrEMo0hxBstLlk8dYhzetCleg35FaRvV5ua fG4AH1+Lj+IsNy973VJ9D4KGZOYSka/5Klo7udnbA/TA9/T7XhRDoBFTkFxEiMslFjpG bchI6fU2zyMKWaO9HguwoVVfUVXmXTGb199dg4HevnZgjrQcBj4ke0WYUD/gTr01e7a9 JUiLiHZdPoQsXt4pFXak13EkrcwMfRTE8t0reKSN8U4/QlnnTGcvDZsObQRKIad7YmF9 bo7w== X-Gm-Message-State: AOJu0YzzqJRL8LzLJ8E98mB5MNyXQZ+RG+oay0ARVA2vtvWWF7TSYDUl 0Fvxwm0fbE1BXjPedkULwF6f1j2R42z7jG1vnJJdhPKq91XxosoR39TAiINqGlI= X-Google-Smtp-Source: AGHT+IHc+GQxrIFb1ZviZJm71pSdkZP6hmkUoi9WiANfeY/tcNWcQmTS3wTFCEH6wRXYAgro9Qtaow== X-Received: by 2002:a05:600c:5252:b0:415:47cd:dfdf with SMTP id fc18-20020a05600c525200b0041547cddfdfmr2291772wmb.12.1711720229877; Fri, 29 Mar 2024 06:50:29 -0700 (PDT) Received: from imac.fritz.box ([2a02:8010:60a0:0:3c9d:7a51:4242:88e2]) by smtp.gmail.com with ESMTPSA id s21-20020a05600c45d500b0041487f70d9fsm8590633wmo.21.2024.03.29.06.50.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 06:50:29 -0700 (PDT) From: Donald Hunter To: netdev@vger.kernel.org, Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , Jiri Pirko , Breno Leitao , Alessandro Marcolini Cc: donald.hunter@redhat.com, Donald Hunter Subject: [PATCH net-next v2 3/3] doc: netlink: Update tc spec with missing definitions Date: Fri, 29 Mar 2024 13:50:21 +0000 Message-ID: <20240329135021.52534-4-donald.hunter@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240329135021.52534-1-donald.hunter@gmail.com> References: <20240329135021.52534-1-donald.hunter@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org The tc spec referenced tc-u32-mark and tc-act-police-attrs but did not define them. The missing definitions were discovered when building the docs with generated hyperlinks because the hyperlink target labels were missing. Add definitions for tc-u32-mark and tc-act-police-attrs. Signed-off-by: Donald Hunter --- Documentation/netlink/specs/tc.yaml | 51 +++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/Documentation/netlink/specs/tc.yaml b/Documentation/netlink/specs/tc.yaml index 324fa182cd14..6068c105c5ee 100644 --- a/Documentation/netlink/specs/tc.yaml +++ b/Documentation/netlink/specs/tc.yaml @@ -1099,6 +1099,19 @@ definitions: - name: offmask type: s32 + - + name: tc-u32-mark + type: struct + members: + - + name: val + type: u32 + - + name: mask + type: u32 + - + name: success + type: u32 - name: tc-u32-sel type: struct @@ -1774,6 +1787,44 @@ attribute-sets: - name: key-ex type: binary + - + name: tc-act-police-attrs + attributes: + - + name: tbf + type: binary + struct: tc-police + - + name: rate + type: binary # TODO + - + name: peakrate + type: binary # TODO + - + name: avrate + type: u32 + - + name: result + type: u32 + - + name: tm + type: binary + struct: tcf-t + - + name: pad + type: pad + - + name: rate64 + type: u64 + - + name: peakrate64 + type: u64 + - + name: pktrate64 + type: u64 + - + name: pktburst64 + type: u64 - name: tc-act-simple-attrs attributes: