From: David Gibson <david@gibson.dropbear.id.au>
To: Matthieu Baerts <matttbe@kernel.org>
Cc: "Íñigo Huguet" <ihuguet@redhat.com>,
"Stefano Brivio" <sbrivio@redhat.com>,
"Fernando Fernandez Mancera" <fmancera@suse.de>,
netdev@vger.kernel.org, yuhuang@redhat.com,
justin.iurman@gmail.com, horms@kernel.org, pabeni@redhat.com,
kuba@kernel.org, edumazet@google.com, davem@davemloft.net,
idosch@nvidia.com, dsahern@kernel.org,
"Chris Adams" <linux@cmadams.net>,
"Beniamino Galvani" <bgalvani@redhat.com>,
"Thorsten Leemhuis" <regressions@leemhuis.info>,
"Andrew Lunn" <andrew@lunn.ch>,
regressions@lists.linux.dev
Subject: Re: [PATCH net v2] Revert "ipv6: preserve insertion order for same-scope addresses"
Date: Wed, 3 Jun 2026 18:02:02 +1000 [thread overview]
Message-ID: <ah_fejZd-lPr6AqM@zatzit> (raw)
In-Reply-To: <8e9cbf0a-caff-4575-afb7-fe852df8a51a@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1957 bytes --]
On Wed, Jun 03, 2026 at 03:46:14PM +1000, Matthieu Baerts wrote:
>
>
> On 02/06/2026 00:01, Íñigo Huguet wrote:
> > On Mon, Jun 1, 2026 at 3:35 PM Stefano Brivio <sbrivio@redhat.com> wrote:
> >> I was thinking that if we implement a label like NLM_F_INSERT_LAST
> >> (David's proposal for the name), we could patch iproute2 to set it on
> >> 'ip address restore' at least, other than using it in pasta(1).
>
> (...)
>
> > What if we reapply the patch and add a NLM_F_INSERT_FIRST /
> > NLM_F_PREPEND option instead? This will break UAPI, which is bad, but
> > probably not too bad per the conversations in this and the other
> > thread.
>
> I guess it is safer not to break UAPI and not reapplying the patch,
> especially when there is no clear way to know which order is taken by
> the kernel.
I think Íñigo wasn't suggesting reapplying the patch as is, but a
modified version that only makes the behavioural change when userspace
sets a new attribute/flag/whatever.
> What about clearly stating that the default order is "random", except
> when an additional flag is set to sort them chronologically or the
> opposite?
We could, but since userspace relying on the existing behaviour is
already out there, I'm not sure what it buys us. The insertion order
also isn't random - it's sorted by scope at least. Theoretically
there could be other (existing) sorting criteria for other address
types (I haven't looked beyong IPv4 and IPv6). The problem arises
because IPv4 and IPv6 have different behaviours when inserting
something where the order isn't defined - IPv4 inserts after existing
entries of the same scope, IPv6 puts it before existing entries of the
same scope - it's literally a < versus a <=.
--
David Gibson (he or they) | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you, not the other way
| around.
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-06-03 8:02 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 11:23 [PATCH net v2] Revert "ipv6: preserve insertion order for same-scope addresses" Fernando Fernandez Mancera
2026-05-29 11:41 ` Stefano Brivio
2026-05-29 11:45 ` Fernando Fernandez Mancera
2026-05-29 12:06 ` Chris Adams
2026-06-01 2:03 ` Matthieu Baerts
2026-06-01 13:35 ` Stefano Brivio
2026-06-01 14:01 ` Íñigo Huguet
2026-06-01 14:22 ` Thorsten Leemhuis
2026-06-03 5:46 ` Matthieu Baerts
2026-06-03 6:53 ` Íñigo Huguet
2026-06-03 7:17 ` Thorsten Leemhuis
2026-06-03 7:29 ` Fernando Fernandez Mancera
2026-06-03 8:00 ` Ido Schimmel
2026-06-03 8:06 ` Fernando Fernandez Mancera
2026-06-03 9:27 ` Matthieu Baerts
2026-06-03 8:02 ` David Gibson [this message]
2026-06-02 6:44 ` IPv6 address insertion order (was Re: [PATCH net v2] Revert "ipv6: preserve insertion order for same-scope addresses") David Gibson
2026-06-02 12:46 ` Andrew Lunn
2026-06-03 1:56 ` David Gibson
2026-06-02 13:21 ` Ido Schimmel
2026-06-03 2:34 ` David Gibson
2026-06-03 7:47 ` Ido Schimmel
2026-05-29 20:20 ` [PATCH net v2] Revert "ipv6: preserve insertion order for same-scope addresses" 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=ah_fejZd-lPr6AqM@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=andrew@lunn.ch \
--cc=bgalvani@redhat.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=fmancera@suse.de \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=ihuguet@redhat.com \
--cc=justin.iurman@gmail.com \
--cc=kuba@kernel.org \
--cc=linux@cmadams.net \
--cc=matttbe@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=regressions@leemhuis.info \
--cc=regressions@lists.linux.dev \
--cc=sbrivio@redhat.com \
--cc=yuhuang@redhat.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