]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
netlink: specs: rename rtnetlink specs in accordance with family name
authorJakub Kicinski <kuba@kernel.org>
Thu, 10 Apr 2025 01:46:46 +0000 (18:46 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 11 Apr 2025 03:14:40 +0000 (20:14 -0700)
The rtnetlink family names are set to rt-$name within the YAML
but the files are called rt_$name. C codegen assumes that the
generated file name will match the family. The use of dashes
is in line with our general expectation that name properties
in the spec use dashes not underscores (even tho, as Donald
points out most genl families use underscores in the name).

We have 3 un-ideal options to choose from:

 - accept the slight inconsistency with old families using _, or
 - accept the slight annoyance with all languages having to do s/-/_/
   when looking up family ID, or
 - accept the inconsistency with all name properties in new YAML spec
   being separated with - and just the family name always using _.

Pick option 1 and rename the rtnl spec files.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://patch.msgid.link/20250410014658.782120-2-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/netlink/specs/rt-addr.yaml [moved from Documentation/netlink/specs/rt_addr.yaml with 100% similarity]
Documentation/netlink/specs/rt-link.yaml [moved from Documentation/netlink/specs/rt_link.yaml with 100% similarity]
Documentation/netlink/specs/rt-neigh.yaml [moved from Documentation/netlink/specs/rt_neigh.yaml with 100% similarity]
Documentation/netlink/specs/rt-route.yaml [moved from Documentation/netlink/specs/rt_route.yaml with 100% similarity]
Documentation/netlink/specs/rt-rule.yaml [moved from Documentation/netlink/specs/rt_rule.yaml with 100% similarity]
Documentation/userspace-api/netlink/netlink-raw.rst
tools/testing/selftests/net/lib/py/ynl.py

index 1990eea772d081f99dcf687b806b434f7964478e..31fc91020eb34a8fab568861add6aa09d1098841 100644 (file)
@@ -62,7 +62,7 @@ Sub-messages
 ------------
 
 Several raw netlink families such as
-:doc:`rt_link<../../networking/netlink_spec/rt_link>` and
+:doc:`rt-link<../../networking/netlink_spec/rt-link>` and
 :doc:`tc<../../networking/netlink_spec/tc>` use attribute nesting as an
 abstraction to carry module specific information.
 
index 8986c584cb371ae354430353517b76bc8503dd69..6329ae805abffd9a18018fe57c79796f966e6260 100644 (file)
@@ -39,12 +39,12 @@ class EthtoolFamily(YnlFamily):
 
 class RtnlFamily(YnlFamily):
     def __init__(self, recv_size=0):
-        super().__init__((SPEC_PATH / Path('rt_link.yaml')).as_posix(),
+        super().__init__((SPEC_PATH / Path('rt-link.yaml')).as_posix(),
                          schema='', recv_size=recv_size)
 
 class RtnlAddrFamily(YnlFamily):
     def __init__(self, recv_size=0):
-        super().__init__((SPEC_PATH / Path('rt_addr.yaml')).as_posix(),
+        super().__init__((SPEC_PATH / Path('rt-addr.yaml')).as_posix(),
                          schema='', recv_size=recv_size)
 
 class NetdevFamily(YnlFamily):