Netdev List
 help / color / mirror / Atom feed
From: "Asbjørn Sloth Tønnesen" <ast@fiberby.net>
To: Donald Hunter <donald.hunter@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>
Cc: "Asbjørn Sloth Tønnesen" <ast@fiberby.net>,
	"David S . Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Simon Horman" <horms@kernel.org>,
	"Felix Maurer" <fmaurer@redhat.com>,
	"Danielle Ratson" <danieller@nvidia.com>,
	"Fernando Fernandez Mancera" <fmancera@suse.de>,
	"Gabriel Goller" <g.goller@proxmox.com>,
	"Patrick Rohr" <prohr@google.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next v2 1/3] netlink: specs: rt-link: update ipv6 devconf doc
Date: Mon, 31 Aug 2026 09:34:53 +0000	[thread overview]
Message-ID: <20260831093458.472180-2-ast@fiberby.net> (raw)
In-Reply-To: <20260831093458.472180-1-ast@fiberby.net>

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 <fmancera@suse.de>
Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
---
 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


  reply	other threads:[~2026-08-31  9:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31  9:34 [PATCH net-next v2 0/3] netlink: specs: rt-link: ipv6 devconf updates Asbjørn Sloth Tønnesen
2026-08-31  9:34 ` Asbjørn Sloth Tønnesen [this message]
2026-08-31  9:34 ` [PATCH net-next v2 2/3] netlink: specs: rt-link: add accept-ra-min-lft Asbjørn Sloth Tønnesen
2026-08-31  9:52   ` Fernando Fernandez Mancera
2026-08-31  9:34 ` [PATCH net-next v2 3/3] netlink: specs: rt-link: add force-forwarding Asbjørn Sloth Tønnesen
2026-08-31  9:53   ` Fernando Fernandez Mancera
2026-08-31 12:54   ` Gabriel Goller
2026-09-01 13:30 ` [PATCH net-next v2 0/3] netlink: specs: rt-link: ipv6 devconf updates patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260831093458.472180-2-ast@fiberby.net \
    --to=ast@fiberby.net \
    --cc=danieller@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=fmancera@suse.de \
    --cc=fmaurer@redhat.com \
    --cc=g.goller@proxmox.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=prohr@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox