netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Kubecek <mkubecek@suse.cz>
To: netdev@vger.kernel.org
Cc: Roopa Prabhu <roopa@cumulusnetworks.com>,
	Jiri Pirko <jiri@resnulli.us>, David Miller <davem@davemloft.net>,
	Jakub Kicinski <jakub.kicinski@netronome.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	David Ahern <dsahern@gmail.com>,
	dcbw@redhat.com, Andrew Lunn <andrew@lunn.ch>,
	parav@mellanox.com, Saeed Mahameed <saeedm@mellanox.com>,
	mlxsw <mlxsw@mellanox.com>
Subject: Re: [patch net-next rfc 3/7] net: rtnetlink: add commands to add and delete alternative ifnames
Date: Mon, 12 Aug 2019 00:10:27 +0200	[thread overview]
Message-ID: <20190811221027.GD30089@unicorn.suse.cz> (raw)
In-Reply-To: <CAJieiUi3n2kKGBVogHBJOd1q+fUjm8ik+xKvDTOxodnZjmH2WQ@mail.gmail.com>

On Sat, Aug 10, 2019 at 12:39:31PM -0700, Roopa Prabhu wrote:
> On Sat, Aug 10, 2019 at 8:50 AM Michal Kubecek <mkubecek@suse.cz> wrote:
> >
> > On Sat, Aug 10, 2019 at 06:46:57AM -0700, Roopa Prabhu wrote:
> > > On Fri, Aug 9, 2019 at 8:46 AM Michal Kubecek <mkubecek@suse.cz> wrote:
> > > >
> > > > On Fri, Aug 09, 2019 at 08:40:25AM -0700, Roopa Prabhu wrote:
> > > > > to that point, I am also not sure why we have a new API For multiple
> > > > > names. I mean why support more than two names  (existing old name and
> > > > > a new name to remove the length limitation) ?
> > > >
> > > > One use case is to allow "predictable names" from udev/systemd to work
> > > > the way do for e.g. block devices, see
> > > >
> > > >   http://lkml.kernel.org/r/20190628162716.GF29149@unicorn.suse.cz
> > > >
> > >
> > > thanks for the link. don't know the details about alternate block
> > > device names. Does user-space generate multiple and assign them to a
> > > kernel object as proposed in this series ?. is there a limit to number
> > > of names ?. my understanding of 'predictable names' was still a single
> > > name but predictable structure to the name.
> >
> > It is a single name but IMHO mostly because we can only have one name.
> > For block devices, udev uses symlinks to create multiple aliases based
> > on different naming schemes, e.g.
> >
> > mike@lion:~> find -L /dev/disk/ -samefile /dev/sda2 -exec ls -l {} +
> > lrwxrwxrwx 1 root root 10 srp  5 21:47 /dev/disk/by-id/ata-WDC_WD30EFRX-68AX9N0_WD-WMC1T3114933-part2 -> ../../sda2
> > lrwxrwxrwx 1 root root 10 srp  5 21:47 /dev/disk/by-id/scsi-SATA_WDC_WD30EFRX-68A_WD-WMC1T3114933-part2 -> ../../sda2
> > lrwxrwxrwx 1 root root 10 srp  5 21:47 /dev/disk/by-id/scsi-SATA_WDC_WD30EFRX-68_WD-WMC1T3114933-part2 -> ../../sda2
> > lrwxrwxrwx 1 root root 10 srp  5 21:47 /dev/disk/by-id/scsi-0ATA_WDC_WD30EFRX-68A_WD-WMC1T3114933-part2 -> ../../sda2
> > lrwxrwxrwx 1 root root 10 srp  5 21:47 /dev/disk/by-id/scsi-1ATA_WDC_WD30EFRX-68AX9N0_WD-WMC1T3114933-part2 -> ../../sda2
> > lrwxrwxrwx 1 root root 10 srp  5 21:47 /dev/disk/by-id/scsi-350014ee6589cfea0-part2 -> ../../sda2
> > lrwxrwxrwx 1 root root 10 srp  5 21:47 /dev/disk/by-id/wwn-0x50014ee6589cfea0-part2 -> ../../sda2
> > lrwxrwxrwx 1 root root 10 srp  5 21:47 /dev/disk/by-partlabel/root2 -> ../../sda2
> > lrwxrwxrwx 1 root root 10 srp  5 21:47 /dev/disk/by-partuuid/71affb47-a93b-40fd-8986-d2e227e1b39d -> ../../sda2
> > lrwxrwxrwx 1 root root 10 srp  5 21:47 /dev/disk/by-path/pci-0000:00:11.0-ata-1-part2 -> ../../sda2
> > lrwxrwxrwx 1 root root 10 srp  5 21:47 /dev/disk/by-path/pci-0000:00:11.0-scsi-0:0:0:0-part2 -> ../../sda2
> >
> > Few years ago, udev even dropped support for renaming block and
> > character devices (NAME="...") so that it now keeps kernel name and only
> > creates symlinks to it. Recent versions only allow NAME="..." for
> > network devices.
> 
> ok thanks for the details. This looks like names that are structured
> on hardware info which could fall into devlinks scope and they point
> to a single name.
> We should think about keeping them under devlink (by-id, by-mac etc).
> It already can recognize network interfaces by id.

Not all of them are hardware based, there are also links based on
filesystem label or UUID. But my point is rather that udev creates
multiple links so that any of them can be used in any place where
a block device is to be identified.

As network devices can have only one name, udev drops kernel provided
name completely and replaces it with name following one naming scheme.
Thus we have to know which naming scheme is going to be used and make
sure it does not change. With multiple alternative names, we could also
have all udev provided names at once (and also the original one from
kernel).

Michal

  reply	other threads:[~2019-08-11 22:10 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-19 11:00 [patch net-next rfc 0/7] net: introduce alternative names for network interfaces Jiri Pirko
2019-07-19 11:00 ` [patch net-next rfc 1/7] net: procfs: use index hashlist instead of name hashlist Jiri Pirko
2019-07-19 11:00 ` [patch net-next rfc 2/7] net: introduce name_node struct to be used in hashlist Jiri Pirko
2019-07-19 16:29   ` Stephen Hemminger
2019-07-19 19:17     ` Jiri Pirko
2019-07-19 20:26       ` Stephen Hemminger
2019-07-20  7:15         ` Jiri Pirko
2019-09-13  9:52         ` Jiri Pirko
2019-08-08  4:34   ` kbuild test robot
2019-07-19 11:00 ` [patch net-next rfc 3/7] net: rtnetlink: add commands to add and delete alternative ifnames Jiri Pirko
2019-07-20  3:58   ` Jakub Kicinski
2019-07-20  7:20     ` Jiri Pirko
2019-08-09  4:11   ` Roopa Prabhu
2019-08-09  6:25     ` Jiri Pirko
2019-08-09 15:40       ` Roopa Prabhu
2019-08-09 15:46         ` Michal Kubecek
2019-08-10 13:46           ` Roopa Prabhu
2019-08-10 15:50             ` Michal Kubecek
2019-08-10 19:39               ` Roopa Prabhu
2019-08-11 22:10                 ` Michal Kubecek [this message]
2019-08-12 15:21                   ` Roopa Prabhu
2019-08-12 15:43                     ` Michal Kubecek
2019-08-09 16:14         ` David Ahern
2019-08-10  6:30           ` Jiri Pirko
2019-08-12  1:34             ` David Ahern
2019-08-12  1:37               ` David Ahern
2019-08-12  8:31                 ` Jiri Pirko
2019-08-12 15:13                   ` Roopa Prabhu
2019-08-12 21:43                     ` Jakub Kicinski
2019-08-13  0:29                       ` David Ahern
2019-08-13  6:53                         ` Jiri Pirko
2019-08-13  6:51                     ` Jiri Pirko
2019-08-12 15:40                   ` Stephen Hemminger
2019-08-12 16:23                     ` Roopa Prabhu
2019-08-13  6:55                     ` Jiri Pirko
2019-08-12 16:01                   ` David Ahern
2019-08-13  6:56                     ` Jiri Pirko
2019-08-26 16:09                       ` Jiri Pirko
2019-08-26 16:55                         ` Jakub Kicinski
2019-08-26 21:46                           ` David Ahern
2019-08-26 22:15                             ` Jakub Kicinski
2019-08-26 22:18                               ` David Miller
2019-08-26 22:24                                 ` David Ahern
2019-08-26 22:25                                   ` David Miller
2019-08-27  0:17                                     ` David Ahern
2019-08-27  5:09                                       ` Michal Kubecek
2019-08-27  7:08                                 ` Jiri Pirko
2019-08-27  8:22                                   ` David Miller
2019-08-27  9:35                                     ` Jiri Pirko
2019-08-27 15:14                                       ` Roopa Prabhu
2019-08-28  7:07                                         ` Jiri Pirko
2019-08-29  4:36                                           ` Roopa Prabhu
2019-08-29  5:26                                             ` Michal Kubecek
2019-08-30 14:35                                               ` Roopa Prabhu
2019-08-30 14:47                                                 ` David Ahern
2019-08-30 17:04                                                   ` Jiri Pirko
2019-08-30 14:49                                                 ` Michal Kubecek
2019-08-30 17:03                                                 ` Jiri Pirko
2019-09-12 11:59                                                   ` Jiri Pirko
2019-09-13  8:21                                                     ` Jiri Pirko
2019-09-13 14:50                                                     ` Jiri Pirko
2019-08-27  4:55                             ` Michal Kubecek
2019-08-27 13:43                               ` David Ahern
2019-08-10  6:32         ` Jiri Pirko
2019-07-19 11:00 ` [patch net-next rfc 4/7] net: rtnetlink: put alternative names to getlink message Jiri Pirko
2019-07-20  3:59   ` Jakub Kicinski
2019-07-20  7:17     ` Jiri Pirko
2019-07-19 11:00 ` [patch net-next rfc 5/7] net: rtnetlink: unify the code in __rtnl_newlink get dev with the rest Jiri Pirko
2019-07-19 11:00 ` [patch net-next rfc 6/7] net: rtnetlink: introduce helper to get net_device instance by ifname Jiri Pirko
2019-07-19 11:00 ` [patch net-next rfc 7/7] net: rtnetlink: add possibility to use alternative names as message handle Jiri Pirko
2019-07-20  3:59   ` Jakub Kicinski
2019-07-20  7:22     ` Jiri Pirko
2019-07-19 11:03 ` [patch iproute2 rfc 1/2] ip: add support for alternative name addition/deletion/list Jiri Pirko
2019-07-19 11:03 ` [patch iproute2 rfc 2/2] ip: allow to use alternative names as handle Jiri Pirko
2019-07-19 16:31 ` [patch net-next rfc 0/7] net: introduce alternative names for network interfaces Stephen Hemminger
2019-07-19 19:16   ` Jiri Pirko

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=20190811221027.GD30089@unicorn.suse.cz \
    --to=mkubecek@suse.cz \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dcbw@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jiri@resnulli.us \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=parav@mellanox.com \
    --cc=roopa@cumulusnetworks.com \
    --cc=saeedm@mellanox.com \
    --cc=sthemmin@microsoft.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;
as well as URLs for NNTP newsgroup(s).