Thread (8 messages) flat view 8 messages, 4 authors, 4d ago
COOLING4d REVIEWED: 1 (0M)

1 review trailer.

[PATCH net-next v2 1/3] netlink: specs: rt-link: update ipv6 devconf doc

From: Asbjørn Sloth Tønnesen <hidden>
Date: 2026-08-31 09:36:17
Also in: lkml
Subsystem: networking [general], the rest, yaml netlink (ynl) · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds, Donald Hunter

devconf is even odder than described in commit 720447bd0b24
("netlink: specs: rt-link: remove implicit structs from devconf"),
where both IPv4 and IPv6 are described in an identical way:
"u32 indexed by ipv?-devconf - 1 on output, on input it's a nest".

There are two issues with that line for IPv6:

1) The subtraction is an IPv4 specific quirk, to avoid having an unused
   u32 at index 0, thus saving 4 bytes per net device being dumped:

   - In include/uapi/linux/ip.h the IPV4_DEVCONF_* enum begins with
     IPV4_DEVCONF_FORWARDING = 1, so the enum starts at 1, which is
     the reason for the subtraction in the IPv4 variant.

   - In include/uapi/linux/ipv6.h the DEVCONF_* enum begins with
     DEVCONF_FORWARDING = 0, so subtraction would underflow.

   - ipv6_store_devconf() in net/ipv6/addrconf.c also doesn't do the
     subtraction in the output path.

2) Setting IPv6 devconf through Netlink is not yet supported, as
   IFLA_INET6_CONF is not handled in inet6_set_link_af().

Reviewed-by: Fernando Fernandez Mancera <redacted>
Signed-off-by: Asbjørn Sloth Tønnesen <redacted>
---
 Documentation/netlink/specs/rt-link.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/netlink/specs/rt-link.yaml b/Documentation/netlink/specs/rt-link.yaml
index b80c2ac3ac31..00c915031efd 100644
--- a/Documentation/netlink/specs/rt-link.yaml
+++ b/Documentation/netlink/specs/rt-link.yaml
@@ -2218,7 +2218,7 @@ attribute-sets:
         name: conf
         type: binary
         sub-type: u32
-        doc: u32 indexed by ipv6-devconf - 1 on output, on input it's a nest
+        doc: u32 indexed by ipv6-devconf on output, input is not yet implemented
       -
         name: stats
         type: binary
-- 
2.55.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help