Skip to contentSkip to conversation

netlink: specs: rt-link: ipv6 devconf updates

PATCH Applied Asbjørn Sloth Tønnesen 4 participants 8 messages Aug 31 – Sep 1

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 cover netlink: specs: rt-link: ipv6 devconf updates

This series updates the doc-string for ifla-inet6-conf, and adds two missing ipv6-devconf enum values as identified by Sashiko during review of v1.

Changes:
v2:
- Update commit message for net-next, and renamed from "netlink: specs: rt-link: fix ipv6 devconf doc"
- Add Reviewed-by from Fernando (Thanks).
- Sashiko comments:
- Added missing enum members accept-ra-min-lft and force-forwarding

     as patch #2 and #3.

- Re: data types: as Jakub wrote in the original commit 720447bd0b24 ("netlink: specs: rt-link: remove implicit structs from devconf"):
"u32 is probably best we can do right now", as the reality is that the sub-type varies per value.
v1: https://lore.kernel.org/[email protected]

Asbjørn Sloth Tønnesen (3):
netlink: specs: rt-link: update ipv6 devconf doc
netlink: specs: rt-link: add accept-ra-min-lft
netlink: specs: rt-link: add force-forwarding

 Documentation/netlink/specs/rt-link.yaml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

base-commit: 1bb784eb6e38fd73143f021608e4ef3095d0c0d7

Signature · 1 line
2.55.0
#1 lore raw

PATCH v2 1/3 netlink: specs: rt-link: update ipv6 devconf doc

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().

---
 Documentation/netlink/specs/rt-link.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/netlink/specs/rt-link.yaml +1 -1
index b80c2ac3ac31..00c915031efd 100644
@@ -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
Signature · 1 line
2.55.0
#2 lore raw

PATCH v2 2/3 netlink: specs: rt-link: add accept-ra-min-lft

In reply to Asbjørn Sloth Tønnesen

Add missing enum member accept-ra-min-lft to ipv6-devconf.

In commit 1671bcfd76fd ("net: add sysctl accept_ra_min_rtr_lft") the DEVCONF_* enum was extended with DEVCONF_ACCEPT_RA_MIN_RTR_LFT.

It was renamed to DEVCONF_ACCEPT_RA_MIN_LFT in commit 5027d54a9c30 ("net: change accept_ra_min_rtr_lft to affect all RA lifetimes").

Shortly thereafter, this spec was introduced in commit b2f63d904e72 ("doc/netlink: Add spec for rt link messages").

This pre-existing issue was detected by Sashiko, when reviewing the first patch in this series.

---
 Documentation/netlink/specs/rt-link.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/netlink/specs/rt-link.yaml +2 -0
index 00c915031efd..ab677801cde8 100644
@@ -494,6 +494,8 @@ definitions:
         name: ndisc-evict-nocarrier
       -
         name: accept-untracked-na
+      -
+        name: accept-ra-min-lft
   -
     name: ifla-icmp6-stats
     enum-name:
Signature · 1 line
2.55.0
Reviewed-by on v2 2/3
#3 lore raw

Re: [PATCH net-next v2 2/3] netlink: specs: rt-link: add accept-ra-min-lft

Quoted 8 lines · Asbjørn Sloth Tønnesen

Add missing enum member accept-ra-min-lft to ipv6-devconf.

In commit 1671bcfd76fd ("net: add sysctl accept_ra_min_rtr_lft") the DEVCONF_* enum was extended with DEVCONF_ACCEPT_RA_MIN_RTR_LFT.

It was renamed to DEVCONF_ACCEPT_RA_MIN_LFT in commit 5027d54a9c30 ("net: change accept_ra_min_rtr_lft to affect all RA lifetimes").

Quoted 8 lines

Shortly thereafter, this spec was introduced in commit b2f63d904e72 ("doc/netlink: Add spec for rt link messages").

This pre-existing issue was detected by Sashiko, when reviewing the first patch in this series.

Thanks!

Quoted 17 lines
---
  Documentation/netlink/specs/rt-link.yaml | 2 ++
  1 file changed, 2 insertions(+)
Documentation/netlink/specs/rt-link.yaml +2 -0
index 00c915031efd..ab677801cde8 100644
@@ -494,6 +494,8 @@ definitions:
          name: ndisc-evict-nocarrier
        -
          name: accept-untracked-na
+      -
+        name: accept-ra-min-lft
    -
      name: ifla-icmp6-stats
      enum-name:
#4 lore raw

PATCH v2 3/3 netlink: specs: rt-link: add force-forwarding

In reply to Asbjørn Sloth Tønnesen

Add missing enum member force-forwarding to ipv6-devconf.

In commit f24987ef6959 ("ipv6: add force_forwarding sysctl to enable per-interface forwarding"), the DEVCONF_* enum was extended with DEVCONF_FORCE_FORWARDING, however Gabriel forgot to add it to the spec.

This pre-existing issue was detected by Sashiko, when reviewing the first patch in this series.

---
 Documentation/netlink/specs/rt-link.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/netlink/specs/rt-link.yaml +2 -0
index ab677801cde8..61ebb9a2bad5 100644
@@ -496,6 +496,8 @@ definitions:
         name: accept-untracked-na
       -
         name: accept-ra-min-lft
+      -
+        name: force-forwarding
   -
     name: ifla-icmp6-stats
     enum-name:
Signature · 1 line
2.55.0
Reviewed-by on v2 3/3
#5 lore raw

Re: [PATCH net-next v2 3/3] netlink: specs: rt-link: add force-forwarding

Quoted 7 lines · Asbjørn Sloth Tønnesen

Add missing enum member force-forwarding to ipv6-devconf.

In commit f24987ef6959 ("ipv6: add force_forwarding sysctl to enable per-interface forwarding"), the DEVCONF_* enum was extended with DEVCONF_FORCE_FORWARDING, however Gabriel forgot to add it to the spec.

Quoted 5 lines

This pre-existing issue was detected by Sashiko, when reviewing the first patch in this series.

Thanks!

Quoted 17 lines
---
  Documentation/netlink/specs/rt-link.yaml | 2 ++
  1 file changed, 2 insertions(+)
Documentation/netlink/specs/rt-link.yaml +2 -0
index ab677801cde8..61ebb9a2bad5 100644
@@ -496,6 +496,8 @@ definitions:
          name: accept-untracked-na
        -
          name: accept-ra-min-lft
+      -
+        name: force-forwarding
    -
      name: ifla-icmp6-stats
      enum-name:
Reviewed-by on v2 3/3
#6 lore raw

Re: [PATCH net-next v2 3/3] netlink: specs: rt-link: add force-forwarding

In reply to Asbjørn Sloth Tønnesen
Quoted 7 lines · Asbjørn Sloth Tønnesen

Add missing enum member force-forwarding to ipv6-devconf.

In commit f24987ef6959 ("ipv6: add force_forwarding sysctl to enable per-interface forwarding"), the DEVCONF_* enum was extended with DEVCONF_FORCE_FORWARDING, however Gabriel forgot to add it to the spec.

Quoted 6 lines

This pre-existing issue was detected by Sashiko, when reviewing the first patch in this series.

---

Ahh, missed this. Thanks for fixing this!

Consider:

Quoted 18 lines
 Documentation/netlink/specs/rt-link.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/netlink/specs/rt-link.yaml +2 -0
index ab677801cde8..61ebb9a2bad5 100644
@@ -496,6 +496,8 @@ definitions:
         name: accept-untracked-na
       -
         name: accept-ra-min-lft
+      -
+        name: force-forwarding
   -
     name: ifla-icmp6-stats
     enum-name:
Signature · 1 line
2.55.0
#7 lore raw
In reply to Asbjørn Sloth Tønnesen
This series was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Quoted 11 lines · On Mon, 31 Aug 2026 09:34:52 +0000 you wrote:

This series updates the doc-string for ifla-inet6-conf, and adds two missing ipv6-devconf enum values as identified by Sashiko during review of v1.

Changes:
v2:
- Update commit message for net-next, and renamed from "netlink: specs: rt-link: fix ipv6 devconf doc"
- Add Reviewed-by from Fernando (Thanks).
- Sashiko comments:
- Added missing enum members accept-ra-min-lft and force-forwarding

Quoted 8 lines
     as patch #2 and #3.

- Re: data types: as Jakub wrote in the original commit 720447bd0b24 ("netlink: specs: rt-link: remove implicit structs from devconf"):
"u32 is probably best we can do right now", as the reality is that the sub-type varies per value.
v1: https://lore.kernel.org/[email protected]

[...]

Here is the summary with links:
- [net-next,v2,1/3] netlink: specs: rt-link: update ipv6 devconf doc

    https://git.kernel.org/netdev/net-next/c/5e63ade19044
  - [net-next,v2,2/3] netlink: specs: rt-link: add accept-ra-min-lft
    https://git.kernel.org/netdev/net-next/c/2b0aecb7b2b1
  - [net-next,v2,3/3] netlink: specs: rt-link: add force-forwarding
    https://git.kernel.org/netdev/net-next/c/f952040d7016

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html