From: Petr Machata <petrm@nvidia.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Petr Machata <petrm@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>, <netdev@vger.kernel.org>,
David Ahern <dsahern@kernel.org>, Shuah Khan <shuah@kernel.org>,
Ido Schimmel <idosch@nvidia.com>, <mlxsw@nvidia.com>
Subject: Re: [PATCH net-next 0/5] net: Extend address label support
Date: Mon, 13 Mar 2023 14:17:25 +0100 [thread overview]
Message-ID: <87wn3ksrxl.fsf@nvidia.com> (raw)
In-Reply-To: <20230310194125.33ca44d7@hermes.local>
Stephen Hemminger <stephen@networkplumber.org> writes:
> On Fri, 10 Mar 2023 12:44:53 +0100
> Petr Machata <petrm@nvidia.com> wrote:
>
>> IPv4 addresses can be tagged with label strings. Unlike IPv6 addrlabels,
>> which are used for prioritization of IPv6 addresses, these "ip address
>> labels" are simply tags that the userspace can assign to IP addresses
>> arbitrarily.
>>
>> IPv4 has had support for these tags since before Linux was tracked in GIT.
>> However it has never been possible to change the label after it is once
>> defined. This limits usefulness of this feature. A userspace that wants to
>> change a label might drop and recreate the address, but that disrupts
>> routing and is just impractical.
>>
>> IPv6 addresses lack support for address labels (in the sense of address
>> tags) altogether.
>>
>> In this patchset, extend IPv4 to allow changing the label defined at an
>> address (in patch #1). Then, in patches #2 and #3, extend IPv6 with a suite
>> of address label operations fully analogous with those defined for IPv4.
>> Then in patches #4 and #5 add selftest coverage for the feature.
>>
>> An example session with the feature in action:
>>
>> # ip address add dev d 2001:db8:1::1/64 label foo
>> # ip address show dev d
>> 4: d: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc [...]
>> link/ether 06:29:74:fd:1f:eb brd ff:ff:ff:ff:ff:ff
>> inet6 2001:db8:1::1/64 scope global foo <--
>> valid_lft forever preferred_lft forever
>> inet6 fe80::429:74ff:fefd:1feb/64 scope link d
>> valid_lft forever preferred_lft forever
>>
>> # ip address replace dev d 2001:db8:1::1/64 label bar
>> # ip address show dev d
>> 4: d: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc [...]
>> link/ether 06:29:74:fd:1f:eb brd ff:ff:ff:ff:ff:ff
>> inet6 2001:db8:1::1/64 scope global bar <--
>> valid_lft forever preferred_lft forever
>> inet6 fe80::429:74ff:fefd:1feb/64 scope link d
>> valid_lft forever preferred_lft forever
>>
>> # ip address del dev d 2001:db8:1::1/64 label foo
>> RTNETLINK answers: Cannot assign requested address
>> # ip address del dev d 2001:db8:1::1/64 label bar
>
> This would add a lot of naming confusion with existing IPv6 address labels.
> And MPLS labels.
The confusion, if any, already exists. ip-address just describes address
labels without any regard to ip-addrlabel, and vice versa. I can
actually add verbiage here to make it clear that these are separate
concepts. Likewise for UAPI headers.
> See man ip-addrlabel for more info. Can't think of better term for this.
> Tag would raise conflicts with vlan/vxlan tag term.
> Name would be confusing vs DNS naming.
>
> Also, most of the real world manages addresses through automated services so
> doing it with ip address isn't going to help.
Yeah. IFA_LABEL exists now, and likely isn't going away.
FWIW I think all it takes to clear up any confusion is a bit of
documentation in man pages and headers.
prev parent reply other threads:[~2023-03-13 13:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 11:44 [PATCH net-next 0/5] net: Extend address label support Petr Machata
2023-03-10 11:44 ` [PATCH net-next 1/5] net: ipv4: Allow changing IPv4 labels Petr Machata
2023-03-10 11:44 ` [PATCH net-next 2/5] net: ipv6: addrconf: Support IPv6 address labels Petr Machata
2023-03-10 11:44 ` [PATCH net-next 3/5] net: ipv6: addrconf: Expose IPv6 address labels through netlink Petr Machata
2023-03-10 11:44 ` [PATCH net-next 4/5] selftests: rtnetlink: Make the set of tests to run configurable Petr Machata
2023-03-10 11:44 ` [PATCH net-next 5/5] selftests: rtnetlink: Add an address label test Petr Machata
2023-03-11 1:12 ` [PATCH net-next 0/5] net: Extend address label support Jakub Kicinski
2023-03-13 13:26 ` Petr Machata
2023-03-13 22:10 ` Jakub Kicinski
2023-03-14 9:44 ` Petr Machata
2023-03-14 17:43 ` Ido Schimmel
2023-03-15 4:37 ` Jakub Kicinski
2023-03-11 3:41 ` Stephen Hemminger
2023-03-13 13:17 ` Petr Machata [this message]
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=87wn3ksrxl.fsf@nvidia.com \
--to=petrm@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=mlxsw@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=stephen@networkplumber.org \
/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;
as well as URLs for NNTP newsgroup(s).