diff mbox series

[net] netlink: specs: fix schema of rt_addr

Message ID 20250401012939.2116915-1-kuba@kernel.org (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series [net] netlink: specs: fix schema of rt_addr | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2025-04-01--03-00 (tests: 902)

Commit Message

Jakub Kicinski April 1, 2025, 1:29 a.m. UTC
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(+)

Comments

Yuyang Huang April 1, 2025, 2:40 a.m. UTC | #1
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
>
Donald Hunter April 1, 2025, 8:28 a.m. UTC | #2
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
Jakub Kicinski April 1, 2025, 2:37 p.m. UTC | #3
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.
diff mbox series

Patch

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