diff mbox series

[net,v3,2/4] netlink: specs: rt_addr: fix get multi command name

Message ID 20250403013706.2828322-3-kuba@kernel.org (mailing list archive)
State Accepted
Commit 524c03585fda36584cc7ada49a1827666d37eb4e
Delegated to: Netdev Maintainers
Headers show
Series netlink: specs: rt_addr: fix problems revealed by C codegen | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
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 Errors and warnings before: 26 (+2) this patch: 26 (+2)
netdev/cc_maintainers warning 2 maintainers not CCed: shuah@kernel.org linux-kselftest@vger.kernel.org
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, 16 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-04--15-00 (tests: 911)

Commit Message

Jakub Kicinski April 3, 2025, 1:37 a.m. UTC
Command names should match C defines, codegens may depend on it.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Fixes: 4f280376e531 ("selftests/net: Add selftest for IPv4 RTM_GETMULTICAST support")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
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(-)

Comments

Donald Hunter April 3, 2025, 8:34 a.m. UTC | #1
Jakub Kicinski <kuba@kernel.org> writes:

> Command names should match C defines, codegens may depend on it.
>
> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> Fixes: 4f280376e531 ("selftests/net: Add selftest for IPv4 RTM_GETMULTICAST support")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> 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

Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
diff mbox series

Patch

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