[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190628155624.GB6640@nanopsycho>
Date: Fri, 28 Jun 2019 17:56:24 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: Andrew Lunn <andrew@...n.ch>, Michal Kubecek <mkubecek@...e.cz>,
netdev@...r.kernel.org, David Ahern <dsahern@...il.com>,
davem@...emloft.net, jakub.kicinski@...ronome.com,
mlxsw@...lanox.com
Subject: Re: [RFC] longer netdev names proposal
Fri, Jun 28, 2019 at 05:44:47PM CEST, stephen@...workplumber.org wrote:
>On Fri, 28 Jun 2019 15:55:53 +0200
>Jiri Pirko <jiri@...nulli.us> wrote:
>
>> Fri, Jun 28, 2019 at 03:14:01PM CEST, andrew@...n.ch wrote:
>> >On Fri, Jun 28, 2019 at 01:12:16PM +0200, Jiri Pirko wrote:
>> >> Thu, Jun 27, 2019 at 09:20:41PM CEST, stephen@...workplumber.org wrote:
>> >> >On Thu, 27 Jun 2019 20:39:48 +0200
>> >> >Michal Kubecek <mkubecek@...e.cz> wrote:
>> >> >
>> >> >> >
>> >> >> > $ ip li set dev enp3s0 alias "Onboard Ethernet"
>> >> >> > # ip link show "Onboard Ethernet"
>> >> >> > Device "Onboard Ethernet" does not exist.
>> >> >> >
>> >> >> > So it does not really appear to be an alias, it is a label. To be
>> >> >> > truly useful, it needs to be more than a label, it needs to be a real
>> >> >> > alias which you can use.
>> >> >>
>> >> >> That's exactly what I meant: to be really useful, one should be able to
>> >> >> use the alias(es) for setting device options, for adding routes, in
>> >> >> netfilter rules etc.
>> >> >>
>> >> >> Michal
>> >> >
>> >> >The kernel doesn't enforce uniqueness of alias.
>> >> >Also current kernel RTM_GETLINK doesn't do filter by alias (easily fixed).
>> >> >
>> >> >If it did, then handling it in iproute would be something like:
>> >>
>> >> I think that it is desired for kernel to work with "real alias" as a
>> >> handle. Userspace could either pass ifindex, IFLA_NAME or "real alias".
>> >> Userspace mapping like you did here might be perhaps okay for iproute2,
>> >> but I think that we need something and easy to use for all.
>> >>
>> >> Let's call it "altname". Get would return:
>> >>
>> >> IFLA_NAME eth0
>> >> IFLA_ALT_NAME_LIST
>> >> IFLA_ALT_NAME eth0
>> >> IFLA_ALT_NAME somethingelse
>> >> IFLA_ALT_NAME somenamethatisreallylong
>> >
>> >Hi Jiri
>> >
>> >What is your user case for having multiple IFLA_ALT_NAME for the same
>> >IFLA_NAME?
>>
>> I don't know about specific usecase for having more. Perhaps Michal
>> does.
>>
>> From the implementation perspective it is handy to have the ifname as
>> the first alt name in kernel, so the userspace would just pass
>> IFLA_ALT_NAME always. Also for avoiding name collisions etc.
>
>I like the alternate name proposal. The kernel would have to impose uniqueness.
>Does alt_name have to be unique across both regular and alt_name?
Yes. That is my idea. To have one big hashtable to contain them all.
>Having multiple names list seems less interesting but it could be useful.
Yeah. Okay, I'm going to jump on this.
Powered by blists - more mailing lists