From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Carlson Date: Tue, 10 Aug 2021 18:11:11 +0000 Subject: Re: [PATCH] ppp: Add rtnl attribute IFLA_PPP_UNIT_ID for specifying ppp unit id Message-Id: <2f10b64e-ba50-d8a5-c40a-9b9bd4264155@workingcode.com> List-Id: References: <20210807163749.18316-1-pali@kernel.org> <20210809122546.758e41de@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20210809193109.mw6ritfdu27uhie7@pali> <20210810153941.GB14279@pc-32.home> <20210810171626.z6bgvizx4eaafrbb@pali> In-Reply-To: <20210810171626.z6bgvizx4eaafrbb@pali> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: =?UTF-8?Q?Pali_Roh=c3=a1r?= , Chris Fowler Cc: Guillaume Nault , Jakub Kicinski , Paul Mackerras , "David S. Miller" , "linux-ppp@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" On 8/10/21 1:16 PM, Pali Roh=C3=A1r wrote: > On Tuesday 10 August 2021 16:38:32 Chris Fowler wrote: >> Isn't the UNIT ID the interface number? As in 'unit 100' will give me p= pp100? >=20 > If you do not specify pppd 'ifname' argument then pppd argument 'unit 100' > will cause that interface name would be ppp100. >=20 > But you are free to rename interface to any string which you like, even > to "ppp99". >=20 > But this ppp unit id is not interface number. Interface number is > another number which has nothing with ppp unit id and is assigned to > every network interface (even loopback). You can see them as the first > number in 'ip -o l' output. Or you can retrieve it via if_nametoindex() > function in C. Correct; completely unrelated to the notion of "interface index." > ... So if people are really using pppd's 'unit' argument then I think it > really make sense to support it also in new rtnl interface. The pppd source base is old. It dates to the mid-80's. So it predates=20 not just rename-able interfaces in Linux but Linux itself. I recall supported platforms in the past (BSD-derived) that didn't=20 support allowing the user to specify the unit number. In general, on=20 those platforms, the option was accepted and just ignored, and there=20 were either release notes or man page updates (on that platform) that=20 indicated that "unit N" wouldn't work there. Are there users on Linux who make use of the "unit" option and who would=20 mourn its loss? Nobody really knows. It's an ancient feature that was=20 originally intended to deal with systems that couldn't rename interfaces=20 (where one had to make sure that the actual interface selected matched=20 up with pre-configured filtering rules or static routes or the like),=20 and to make life nice for administrators (e.g., making sure that serial=20 port 1 maps to ppp1, port 2 is ppp2, and so on). I would think and hope most users reach for the more-flexible "ifname"=20 option first, but I certainly can't guarantee it. It could be buried in=20 a script somewhere or (god forbid) some kind of GUI or "usability" tool. If I were back at Sun, I'd probably call it suitable only for a "Major"=20 release, as it removes a publicly documented feature. But I don't know=20 what the considerations are here. Maybe it's just a "don't really care." --=20 James Carlson 42.703N 71.076W