From patchwork Thu Apr 3 01:37:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 14036921 X-Patchwork-Delegate: kuba@kernel.org 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 C38BE13AA2D for ; Thu, 3 Apr 2025 01:37: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=1743644242; cv=none; b=ZzklCPf3q8CqPMsohFWVSufDdkvr4WE1B4r9fn6cTapXOurKNkN0/yRy+4GTpluvjZEJ9bxDaFq9bzs6ZOx3v7N1ZtWV+wWCX0T3l+gBUR2rc7EiQMcGPsoiLabV2cwzFKz5+i55IS4KlR+h4jAhen2eTxH72Tw8NvXexxvFMwU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743644242; c=relaxed/simple; bh=g0QopiSPhA8DWJv4rtbKskhDsY4FcA8NJnDPzUNwDfA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K9yxK1da29RyNyObabtKXwnY2SIpWFstb8GeY/9f6HTdsxIcQUvEON+9DZyOFnrn7dv4GCQ+miZRiVUy/KQ0sT3TnUzY/YuYK9a7eUyUhubLfwuspwFOcUmRAotwW3P5p+2lC9+YVyeDLXUV1Xjk+/vNyrH0kEnwsQmKHoOBPVE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HZmXMuOQ; 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="HZmXMuOQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3D88C4CEEB; Thu, 3 Apr 2025 01:37:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743644242; bh=g0QopiSPhA8DWJv4rtbKskhDsY4FcA8NJnDPzUNwDfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HZmXMuOQaL1XROfo1ya11WVfCG4KD5YCndZY5cki1RNlHkxfHzt1bN9N3rsKoN56D 0STZ6FoMGgwV+q6o9RcdmLT+R23QOqbmYGXz9KXkzZBpjp8QhWNUkiHoh5fhaB9pIS RZFm7uZq5dFI+FhBmlsEfuK227qQmzTJ4IusJdaj8N1qmvWjqHbd5Bz7xMwZgBRIOj LKcjC7k2ZacwE57Iq95uxWMdTXUbw9OtLYTQRrYLSchU5oCAOjL6zlO3d2KQfu3gr5 JLjwTK/xHU0FU/xpW4klTupi/HP96q6EyohFYJ8B4MWxghyXUTBnYpJ3YnF/VhPkpO Y63R9JY/yBZUQ== From: Jakub Kicinski To: davem@davemloft.net Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org, donald.hunter@gmail.com, yuyanghuang@google.com, jacob.e.keller@intel.com, Jakub Kicinski Subject: [PATCH net v3 1/4] netlink: specs: rt_addr: fix the spec format / schema failures Date: Wed, 2 Apr 2025 18:37:03 -0700 Message-ID: <20250403013706.2828322-2-kuba@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250403013706.2828322-1-kuba@kernel.org> References: <20250403013706.2828322-1-kuba@kernel.org> 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 spec is mis-formatted, schema validation says: Failed validating 'type' in schema['properties']['operations']['properties']['list']['items']['properties']['dump']['properties']['request']['properties']['value']: {'minimum': 0, 'type': 'integer'} On instance['operations']['list'][3]['dump']['request']['value']: '58 - ifa-family' The ifa-family clearly wants to be part of an attribute list. Reviewed-by: Jacob Keller Reviewed-by: Donald Hunter Reviewed-by: Yuyang Huang Fixes: 4f280376e531 ("selftests/net: Add selftest for IPv4 RTM_GETMULTICAST support") Signed-off-by: Jakub Kicinski --- CC: donald.hunter@gmail.com CC: yuyanghuang@google.com CC: jacob.e.keller@intel.com --- Documentation/netlink/specs/rt_addr.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/netlink/specs/rt_addr.yaml b/Documentation/netlink/specs/rt_addr.yaml index 5dd5469044c7..3bc9b6f9087e 100644 --- a/Documentation/netlink/specs/rt_addr.yaml +++ b/Documentation/netlink/specs/rt_addr.yaml @@ -187,6 +187,7 @@ protonum: 0 dump: request: value: 58 + attributes: - ifa-family reply: value: 58 From patchwork Thu Apr 3 01:37:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 14036922 X-Patchwork-Delegate: kuba@kernel.org 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 DA0AF13B58A for ; Thu, 3 Apr 2025 01:37: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=1743644242; cv=none; b=O7pEb0K3tyrYm87cYsaJ5lS/p3TUG/45pRkTHuULyCDGbSXbS9Tn1IXvAgW2S+zFkgQ2hB6PLWCetupDb2jtq+hR0vg+4nffius8Abc5Vhwo5Dan0Auixidry29o1li8kIvj+InXjaCFRHqXLX01rM2Q7F5FqZNw/09g9mIriCE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743644242; c=relaxed/simple; bh=nQxMKJY1rEc96+xAd6hgOPe/yh8PR+pNCTyM6ajEleM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=At3yTTMegTVyiUyH/JFEZKez8ByotzYD86qFRO4n5CQOWhzXEJ5R0aRylx0aLb/1G7PDskaGP+FG0Vz/YkK/mFaxSVHQ/GjNoghYxWlNcGO7UrTEI8mTRViQDIZQt8DgmUoPnErCrN3BVGYtO15jmt4feqtuCez0dp/rsQqk/G0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GN2osj93; 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="GN2osj93" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61609C4CEE7; Thu, 3 Apr 2025 01:37:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743644242; bh=nQxMKJY1rEc96+xAd6hgOPe/yh8PR+pNCTyM6ajEleM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GN2osj93EEc69cUZ3yk0eUa1LxaVtIos6OdezijO+m0h4wn7OHXWBQkGPSftgnPzj 8VvDJfCyihrJYcMyq8tNT/ndOOqvtZsOnzqOfRZSAF7mp1OL4K25Eb35bTS0I4oizY +16hJtfAGPzLlseBQUG4/DlMAXRUhFPBs9BX5VQ4Z01o+4YGQYZiVDaukbkvxGDPpD Y00fApgvYvhfjytwKebMyV1buFmuZb4YYhdxvlYcxBUWAFJ995/9X8PLHtITcQsicd Sr1f/CaMut6z5RiD4KcnuaMhCbXvX4fw5NAo8mopLGY9WfMornTpjjmOYNQlysGiez zz1YhNU30RRyw== From: Jakub Kicinski To: davem@davemloft.net Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org, donald.hunter@gmail.com, yuyanghuang@google.com, jacob.e.keller@intel.com, Jakub Kicinski Subject: [PATCH net v3 2/4] netlink: specs: rt_addr: fix get multi command name Date: Wed, 2 Apr 2025 18:37:04 -0700 Message-ID: <20250403013706.2828322-3-kuba@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250403013706.2828322-1-kuba@kernel.org> References: <20250403013706.2828322-1-kuba@kernel.org> 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 Command names should match C defines, codegens may depend on it. Reviewed-by: Jacob Keller Fixes: 4f280376e531 ("selftests/net: Add selftest for IPv4 RTM_GETMULTICAST support") Signed-off-by: Jakub Kicinski Reviewed-by: Donald Hunter --- v3: - fix the op name in the test v2: https://lore.kernel.org/20250402010300.2399363-3-kuba@kernel.org --- Documentation/netlink/specs/rt_addr.yaml | 2 +- tools/testing/selftests/net/rtnetlink.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/netlink/specs/rt_addr.yaml b/Documentation/netlink/specs/rt_addr.yaml index 3bc9b6f9087e..1650dc3f091a 100644 --- a/Documentation/netlink/specs/rt_addr.yaml +++ b/Documentation/netlink/specs/rt_addr.yaml @@ -169,7 +169,7 @@ protonum: 0 value: 20 attributes: *ifaddr-all - - name: getmaddrs + name: getmulticast doc: Get / dump IPv4/IPv6 multicast addresses. attribute-set: addr-attrs fixed-header: ifaddrmsg diff --git a/tools/testing/selftests/net/rtnetlink.py b/tools/testing/selftests/net/rtnetlink.py index 80950888800b..69436415d56e 100755 --- a/tools/testing/selftests/net/rtnetlink.py +++ b/tools/testing/selftests/net/rtnetlink.py @@ -12,7 +12,7 @@ IPV4_ALL_HOSTS_MULTICAST = b'\xe0\x00\x00\x01' At least the loopback interface should have this address. """ - addresses = rtnl.getmaddrs({"ifa-family": socket.AF_INET}, dump=True) + addresses = rtnl.getmulticast({"ifa-family": socket.AF_INET}, dump=True) all_host_multicasts = [ addr for addr in addresses if addr['ifa-multicast'] == IPV4_ALL_HOSTS_MULTICAST From patchwork Thu Apr 3 01:37:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 14036923 X-Patchwork-Delegate: kuba@kernel.org 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 BA6B1151985 for ; Thu, 3 Apr 2025 01:37:23 +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=1743644243; cv=none; b=bE73S3PJJYNAaAiIw84I0cthwZNfk+aEF5+UA57Gvh1yaL4Ne8MkmNvLb0l43+CKIWNsHXRTmTglCQ6E56Xlkd39cxao5KkuZSzQ4ZOimxJDwDPuYGwKqh1QcEhV5bak0WRahddFsmtjmdjRl1gUsdrzS1cOjtGISu+8gqGqCB0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743644243; c=relaxed/simple; bh=8GdXf5XH0I39LS9C7Dyuouew7AXYrcHfJ8Y9efUw3HE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JQaOuiNk3xpoqbZqpDlSDROYSc5J+q/87Ko0DZQVxVQT13c4sBe+l1iYCXVOwHrPn5+D/mqhYBJV91yaO4ok2vs+OOBJ4Qs/EtaOxiIZk9Krnv6skErsgCEU8WtZ4ZwyAFNy81gB4tyEN76kuiKcT+yQj8cx9/yT5Q7MOAZbhM0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LPDxvq8k; 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="LPDxvq8k" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3AAFC4CEED; Thu, 3 Apr 2025 01:37:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743644243; bh=8GdXf5XH0I39LS9C7Dyuouew7AXYrcHfJ8Y9efUw3HE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LPDxvq8k5UlqjkR/WOrD+B7YVf+EstkF0WDIstsjbaJ94CXnugm8GsGTUZSowSLNI mhpqMcU9WP6bQ3wJs8NdaAXcb55Imhj04Qlpy6UpqYuzO8MRalb/T8scNUH0djd/Xm e46e0weVvmNFum7IDG3blrTBNkyd6rcJYYdzRBGEPd3kkf130SVD9sFBh5otHfcV2W F8Gtr6wDuNp0ZDOocZsQ6ZIKqEfqKtL7GquZ4oDclZ8Kkb6P5VsOLls8k8s62APyni /ZdpkORl2Yl+gnPvkwSbZSgKhdNAGRz/QRf+DdlfD3A+5f0mKSDDHYVejweOweMCl5 +SOV+TJuZKrCg== From: Jakub Kicinski To: davem@davemloft.net Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org, donald.hunter@gmail.com, yuyanghuang@google.com, jacob.e.keller@intel.com, Jakub Kicinski Subject: [PATCH net v3 3/4] netlink: specs: rt_addr: pull the ifa- prefix out of the names Date: Wed, 2 Apr 2025 18:37:05 -0700 Message-ID: <20250403013706.2828322-4-kuba@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250403013706.2828322-1-kuba@kernel.org> References: <20250403013706.2828322-1-kuba@kernel.org> 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 YAML specs don't normally include the C prefix name in the name of the YAML attr. Remove the ifa- prefix from all attributes in addr-attrs and specify name-prefix instead. This is a bit risky, hopefully there aren't many users out there. Fixes: dfb0f7d9d979 ("doc/netlink: Add spec for rt addr messages") Signed-off-by: Jakub Kicinski Reviewed-by: Donald Hunter --- v3: - don't remove prefix from the struct name v2: https://lore.kernel.org/20250402010300.2399363-4-kuba@kernel.org --- Documentation/netlink/specs/rt_addr.yaml | 39 ++++++++++++------------ tools/testing/selftests/net/rtnetlink.py | 2 +- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/Documentation/netlink/specs/rt_addr.yaml b/Documentation/netlink/specs/rt_addr.yaml index 1650dc3f091a..df6b23f06a22 100644 --- a/Documentation/netlink/specs/rt_addr.yaml +++ b/Documentation/netlink/specs/rt_addr.yaml @@ -78,45 +78,46 @@ protonum: 0 attribute-sets: - name: addr-attrs + name-prefix: ifa- attributes: - - name: ifa-address + name: address type: binary display-hint: ipv4 - - name: ifa-local + name: local type: binary display-hint: ipv4 - - name: ifa-label + name: label type: string - - name: ifa-broadcast + name: broadcast type: binary display-hint: ipv4 - - name: ifa-anycast + name: anycast type: binary - - name: ifa-cacheinfo + name: cacheinfo type: binary struct: ifa-cacheinfo - - name: ifa-multicast + name: multicast type: binary - - name: ifa-flags + name: flags type: u32 enum: ifa-flags enum-as-flags: true - - name: ifa-rt-priority + name: rt-priority type: u32 - - name: ifa-target-netnsid + name: target-netnsid type: binary - - name: ifa-proto + name: proto type: u8 @@ -137,10 +138,10 @@ protonum: 0 - ifa-prefixlen - ifa-scope - ifa-index - - ifa-address - - ifa-label - - ifa-local - - ifa-cacheinfo + - address + - label + - local + - cacheinfo - name: deladdr doc: Remove address @@ -154,8 +155,8 @@ protonum: 0 - ifa-prefixlen - ifa-scope - ifa-index - - ifa-address - - ifa-local + - address + - local - name: getaddr doc: Dump address information. @@ -182,8 +183,8 @@ protonum: 0 reply: value: 58 attributes: &mcaddr-attrs - - ifa-multicast - - ifa-cacheinfo + - multicast + - cacheinfo dump: request: value: 58 diff --git a/tools/testing/selftests/net/rtnetlink.py b/tools/testing/selftests/net/rtnetlink.py index 69436415d56e..e9ad5e88da97 100755 --- a/tools/testing/selftests/net/rtnetlink.py +++ b/tools/testing/selftests/net/rtnetlink.py @@ -15,7 +15,7 @@ IPV4_ALL_HOSTS_MULTICAST = b'\xe0\x00\x00\x01' addresses = rtnl.getmulticast({"ifa-family": socket.AF_INET}, dump=True) all_host_multicasts = [ - addr for addr in addresses if addr['ifa-multicast'] == IPV4_ALL_HOSTS_MULTICAST + addr for addr in addresses if addr['multicast'] == IPV4_ALL_HOSTS_MULTICAST ] ksft_ge(len(all_host_multicasts), 1, From patchwork Thu Apr 3 01:37:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 14036924 X-Patchwork-Delegate: kuba@kernel.org 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 1D9001624F4 for ; Thu, 3 Apr 2025 01:37:23 +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=1743644244; cv=none; b=P+Tvg648NlpVzBctKnawiRyCEtETHjGkeEs/1hFqIOzhT7hLSZdiQ1gYIkjtKdR4e2LGMrM+t6Glm3oicA5BcGMJw5JffNxA6ok6F60cZN4S40RBCWNb4GPI9M7OLJteKdsz2kV3QIOKBj7Q5uD/OGkMDBP7UxNUaKBvSq3Mh6A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743644244; c=relaxed/simple; bh=4lkbtWQCafKDqoBGuszddW3O5DhmIG1mKt40EKTaqRI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mfnBhD0KCCWfVBrP+i1HIP2Wia9ptbmJCCkb7jCL00sS1+5Xb+TnOspJstMFS4CfOgiCXNH2ojAd6MqF2vGJn7+SIuAdXeYzO9QWc+YJq/2SUxxBFcIRIGPm/0QtEtBFH1YVf9Y6yV1vqA6RHBR19cBynNML4YWpCldQFKinTQM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QSjgYTfn; 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="QSjgYTfn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51A23C4CEDD; Thu, 3 Apr 2025 01:37:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743644243; bh=4lkbtWQCafKDqoBGuszddW3O5DhmIG1mKt40EKTaqRI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QSjgYTfnNULMYrX5bfoCU9IuT9gq0njNrewN35kFacUVrRsUz3JJkdt98WOHXQJSN i93i1FMkBASCOBgm61myKiFTMoJzMcq9UsIEPra2gpwjubSmnv9jNbsIFjrw1JcppH yQf97Ym+WukqtuA64Ex/e2jK2wKV8k0qOIq9eWeCfh41k3mc2tw6l/yEICu88QvO5L aEGnHsiMWwh8GlWQejBEe6wsTCgwL5W2m+jqkfMf0BIuJw99REhpvBztsbJeaz0UQT fWWyYLt8bWyR1PDebZxJH5pRPn+MiPlXfvc1vEWm30wHj3ZAwj+Gu3OtVox+ASBYKe rmGlcZ2VvABMg== From: Jakub Kicinski To: davem@davemloft.net Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org, donald.hunter@gmail.com, yuyanghuang@google.com, jacob.e.keller@intel.com, Jakub Kicinski Subject: [PATCH net v3 4/4] netlink: specs: rt_route: pull the ifa- prefix out of the names Date: Wed, 2 Apr 2025 18:37:06 -0700 Message-ID: <20250403013706.2828322-5-kuba@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250403013706.2828322-1-kuba@kernel.org> References: <20250403013706.2828322-1-kuba@kernel.org> 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 YAML specs don't normally include the C prefix name in the name of the YAML attr. Remove the ifa- prefix from all attributes in route-attrs and metrics and specify name-prefix instead. This is a bit risky, hopefully there aren't many users out there. Fixes: 023289b4f582 ("doc/netlink: Add spec for rt route messages") Signed-off-by: Jakub Kicinski Reviewed-by: Donald Hunter --- v3: - new --- Documentation/netlink/specs/rt_route.yaml | 180 +++++++++++----------- 1 file changed, 91 insertions(+), 89 deletions(-) diff --git a/Documentation/netlink/specs/rt_route.yaml b/Documentation/netlink/specs/rt_route.yaml index a674103e5bc4..292469c7d4b9 100644 --- a/Documentation/netlink/specs/rt_route.yaml +++ b/Documentation/netlink/specs/rt_route.yaml @@ -80,165 +80,167 @@ protonum: 0 attribute-sets: - name: route-attrs + name-prefix: rta- attributes: - - name: rta-dst + name: dst type: binary display-hint: ipv4 - - name: rta-src + name: src type: binary display-hint: ipv4 - - name: rta-iif + name: iif type: u32 - - name: rta-oif + name: oif type: u32 - - name: rta-gateway + name: gateway type: binary display-hint: ipv4 - - name: rta-priority + name: priority type: u32 - - name: rta-prefsrc + name: prefsrc type: binary display-hint: ipv4 - - name: rta-metrics + name: metrics type: nest - nested-attributes: rta-metrics + nested-attributes: metrics - - name: rta-multipath + name: multipath type: binary - - name: rta-protoinfo # not used + name: protoinfo # not used type: binary - - name: rta-flow + name: flow type: u32 - - name: rta-cacheinfo + name: cacheinfo type: binary struct: rta-cacheinfo - - name: rta-session # not used + name: session # not used type: binary - - name: rta-mp-algo # not used + name: mp-algo # not used type: binary - - name: rta-table + name: table type: u32 - - name: rta-mark + name: mark type: u32 - - name: rta-mfc-stats + name: mfc-stats type: binary - - name: rta-via + name: via type: binary - - name: rta-newdst + name: newdst type: binary - - name: rta-pref + name: pref type: u8 - - name: rta-encap-type + name: encap-type type: u16 - - name: rta-encap + name: encap type: binary # tunnel specific nest - - name: rta-expires + name: expires type: u32 - - name: rta-pad + name: pad type: binary - - name: rta-uid + name: uid type: u32 - - name: rta-ttl-propagate + name: ttl-propagate type: u8 - - name: rta-ip-proto + name: ip-proto type: u8 - - name: rta-sport + name: sport type: u16 - - name: rta-dport + name: dport type: u16 - - name: rta-nh-id + name: nh-id type: u32 - - name: rta-flowlabel + name: flowlabel type: u32 byte-order: big-endian display-hint: hex - - name: rta-metrics + name: metrics + name-prefix: rtax- attributes: - - name: rtax-unspec + name: unspec type: unused value: 0 - - name: rtax-lock + name: lock type: u32 - - name: rtax-mtu + name: mtu type: u32 - - name: rtax-window + name: window type: u32 - - name: rtax-rtt + name: rtt type: u32 - - name: rtax-rttvar + name: rttvar type: u32 - - name: rtax-ssthresh + name: ssthresh type: u32 - - name: rtax-cwnd + name: cwnd type: u32 - - name: rtax-advmss + name: advmss type: u32 - - name: rtax-reordering + name: reordering type: u32 - - name: rtax-hoplimit + name: hoplimit type: u32 - - name: rtax-initcwnd + name: initcwnd type: u32 - - name: rtax-features + name: features type: u32 - - name: rtax-rto-min + name: rto-min type: u32 - - name: rtax-initrwnd + name: initrwnd type: u32 - - name: rtax-quickack + name: quickack type: u32 - - name: rtax-cc-algo + name: cc-algo type: string - - name: rtax-fastopen-no-cookie + name: fastopen-no-cookie type: u32 operations: @@ -254,18 +256,18 @@ protonum: 0 value: 26 attributes: - rtm-family - - rta-src + - src - rtm-src-len - - rta-dst + - dst - rtm-dst-len - - rta-iif - - rta-oif - - rta-ip-proto - - rta-sport - - rta-dport - - rta-mark - - rta-uid - - rta-flowlabel + - iif + - oif + - ip-proto + - sport + - dport + - mark + - uid + - flowlabel reply: value: 24 attributes: &all-route-attrs @@ -278,34 +280,34 @@ protonum: 0 - rtm-scope - rtm-type - rtm-flags - - rta-dst - - rta-src - - rta-iif - - rta-oif - - rta-gateway - - rta-priority - - rta-prefsrc - - rta-metrics - - rta-multipath - - rta-flow - - rta-cacheinfo - - rta-table - - rta-mark - - rta-mfc-stats - - rta-via - - rta-newdst - - rta-pref - - rta-encap-type - - rta-encap - - rta-expires - - rta-pad - - rta-uid - - rta-ttl-propagate - - rta-ip-proto - - rta-sport - - rta-dport - - rta-nh-id - - rta-flowlabel + - dst + - src + - iif + - oif + - gateway + - priority + - prefsrc + - metrics + - multipath + - flow + - cacheinfo + - table + - mark + - mfc-stats + - via + - newdst + - pref + - encap-type + - encap + - expires + - pad + - uid + - ttl-propagate + - ip-proto + - sport + - dport + - nh-id + - flowlabel dump: request: value: 26