netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] netlink: specs: fix schema of rt_addr
@ 2025-04-01  1:29 Jakub Kicinski
  2025-04-01  2:40 ` Yuyang Huang
  2025-04-01  8:28 ` Donald Hunter
  0 siblings, 2 replies; 4+ messages in thread
From: Jakub Kicinski @ 2025-04-01  1:29 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, Jakub Kicinski,
	donald.hunter, yuyanghuang, jacob.e.keller

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.

Fixes: dfb0f7d9d979 ("doc/netlink: Add spec for rt addr messages")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
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
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net] netlink: specs: fix schema of rt_addr
  2025-04-01  1:29 [PATCH net] netlink: specs: fix schema of rt_addr Jakub Kicinski
@ 2025-04-01  2:40 ` Yuyang Huang
  2025-04-01  8:28 ` Donald Hunter
  1 sibling, 0 replies; 4+ messages in thread
From: Yuyang Huang @ 2025-04-01  2:40 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms,
	donald.hunter, jacob.e.keller

Reviewed-by: Yuyang Huang <yuyanghuang@google.com>


On Tue, Apr 1, 2025 at 10:29 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> 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.
>
> Fixes: dfb0f7d9d979 ("doc/netlink: Add spec for rt addr messages")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> 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
> --
> 2.49.0
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net] netlink: specs: fix schema of rt_addr
  2025-04-01  1:29 [PATCH net] netlink: specs: fix schema of rt_addr Jakub Kicinski
  2025-04-01  2:40 ` Yuyang Huang
@ 2025-04-01  8:28 ` Donald Hunter
  2025-04-01 14:37   ` Jakub Kicinski
  1 sibling, 1 reply; 4+ messages in thread
From: Donald Hunter @ 2025-04-01  8:28 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms,
	yuyanghuang, jacob.e.keller

Jakub Kicinski <kuba@kernel.org> writes:

> 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.
>
> Fixes: dfb0f7d9d979 ("doc/netlink: Add spec for rt addr messages")

The fixes tag looks wrong. I think it should be:

Fixes: 4f280376e531 ("selftests/net: Add selftest for IPv4 RTM_GETMULTICAST support")

I wonder if the op name should be changed from getmaddrs to getmaddr,
removing the plural to be consistent with do/dump conventions, or to
getmulticast to be consistent with RTM_GETMULTICAST.

> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net] netlink: specs: fix schema of rt_addr
  2025-04-01  8:28 ` Donald Hunter
@ 2025-04-01 14:37   ` Jakub Kicinski
  0 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2025-04-01 14:37 UTC (permalink / raw)
  To: Donald Hunter
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms,
	yuyanghuang, jacob.e.keller

On Tue, 01 Apr 2025 09:28:10 +0100 Donald Hunter wrote:
> Fixes: 4f280376e531 ("selftests/net: Add selftest for IPv4 RTM_GETMULTICAST support")

My bad!

> I wonder if the op name should be changed from getmaddrs to getmaddr,
> removing the plural to be consistent with do/dump conventions, or to
> getmulticast to be consistent with RTM_GETMULTICAST.

Well spotted! I have that change queued for net-next, but you're right,
we better send it as a fix, before too many people depend on it.
-- 
pw-bot: cr

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-04-01 14:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-01  1:29 [PATCH net] netlink: specs: fix schema of rt_addr Jakub Kicinski
2025-04-01  2:40 ` Yuyang Huang
2025-04-01  8:28 ` Donald Hunter
2025-04-01 14:37   ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).