Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3745420pxt; Tue, 10 Aug 2021 10:19:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8gA6dnsx3IYAEYsGTjkX0xKDbiP/cR8YdLBCUw8y86pI2Gmo8+ty2fcwwZDj4IFOMsCuy X-Received: by 2002:a92:7d07:: with SMTP id y7mr231757ilc.68.1628615942158; Tue, 10 Aug 2021 10:19:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628615942; cv=none; d=google.com; s=arc-20160816; b=T3t0ZJZ3f8keuY7vO809swosuzbjsBiK8Ad3kiff8DjzXAIXI72NeHsbDlhD6lF8hQ Vtco7yex0hFSOd2VMt5/QEXLSSZwL+/VEGATzmHv7bTKZgC4Hb/StwcF/OdcqrMFANdC n1kTQnydfoYZtZL1iq9tEj9kSuaH7G9AuaGLue1yyzpbdbtjcbJBTmGcPk3Qpyy0yMzB YZNYnjDehW3ctYkjCP9SFqHqvyK5KkSjvQup/+Gr5GFFVh0hpr3eTJurG208zvUWPP15 gLIMoUFzxxTZo8tVZZpCBxIOrzLHD/7MMwycspGpjuhec4bBK0NkRt1ily4TrOmx26pH /tIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xrwk9VA800FfAQjFPsv90iWaWdSZvrfXibp7/ePmDk4=; b=jDffBTF57TCUyu89A+s1RjakXpdl2APzlqfVCFED0a2JOf6RDrWQtKtpBlE9OxbBcn fjS+1JyRI8iCOttuefelTyNCCJqTTAsut7Y6LFCi1HffwEs9zUVQcrpe0UG4Bw52EfTg A7warvspTIys7yexVxE18JOJMWce+R60ALW8d/HYU7oNsMDtvwRWx2bl+q2C4ZosxnHX wvXDgoG0afL+f/aAIXEMKpjvHrmVXh11vY7e4QAtfrf6BwTnryPDn6UrsPTeyTDKli8G ZARHPIUVpDuBIgw7EvglRwBubPmaq4M4V90K0mql2HGf1qy/r+qW2sQphy7FTXvHNmbb HpUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lsWcNocO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b2si20073337jad.13.2021.08.10.10.18.48; Tue, 10 Aug 2021 10:19:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lsWcNocO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232421AbhHJRRA (ORCPT + 99 others); Tue, 10 Aug 2021 13:17:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:40642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232046AbhHJRQz (ORCPT ); Tue, 10 Aug 2021 13:16:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4ABD360EBD; Tue, 10 Aug 2021 17:16:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628615792; bh=JSZL0e4NclyDFSNzNmGpeWxp9VO4KgNeNMmFx3jjGG8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lsWcNocO2695V/zQ5Q1GCglj67pSLVKLTwpLXBfjTbRp9EdMmoMOTfCR2YXazuQ4o VPgtJvmKYpv6QwpprDHJ779acSLSRLe57UOWu4AGV0b+1M1EUhX83p91nR1xhKP9T9 7R4lXvbY34G75bvLALefPTws1SUTkKjwTR2GL7RLAOA+AKWWo6fXYShD5/XqToBIBk QbAvCp3GNekDfnIxnnRAQlVQG0huqSFdWyaiasQ4Vx5efVhsmJOR4yTjhVYvgJpkDB z8/visefC3Y3AtKmYSHOtuMB6RxVIaPy6hLV/ObubZQKH/zxkjCwJysgUhVjPvCX4w MUWSgKn3ODg5A== Received: by pali.im (Postfix) id 9C19082D; Tue, 10 Aug 2021 19:16:26 +0200 (CEST) Date: Tue, 10 Aug 2021 19:16:26 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: 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" Subject: Re: [PATCH] ppp: Add rtnl attribute IFLA_PPP_UNIT_ID for specifying ppp unit id Message-ID: <20210810171626.z6bgvizx4eaafrbb@pali> References: <20210807163749.18316-1-pali@kernel.org> <20210809122546.758e41de@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20210809193109.mw6ritfdu27uhie7@pali> <20210810153941.GB14279@pc-32.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ppp100? If you do not specify pppd 'ifname' argument then pppd argument 'unit 100' will cause that interface name would be ppp100. But you are free to rename interface to any string which you like, even to "ppp99". 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. ... 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. > I have it running on over 1000 interfaces. I use PPP in a P-t-P VPN scenario between a central server and remote network devices. Iuse the unit id to identify a primary key in a database for that connection. This is calculated as 1000+N = UNIT ID. > > I use 1000 because I've also used PPP on the same system with modem boards for demand dial PPP connections. The up and down scripts executed by PPP are written in C and allow a system where if the VPN link is down, the remote can dial and obtain the same IP addressing via modem. We don't use modems that often now due to reliability issues. It has been harder obtaining clean lines in the US. > > The C program also applies routes that are defined in the database. That search is based on the IP assigned, not the unit id. > > Chris > > ________________________________ > From: Guillaume Nault > Sent: Tuesday, August 10, 2021 11:39 AM > To: Pali Rohár > Cc: Jakub Kicinski ; Paul Mackerras ; David S. Miller ; linux-ppp@vger.kernel.org ; netdev@vger.kernel.org ; linux-kernel@vger.kernel.org > Subject: Re: [PATCH] ppp: Add rtnl attribute IFLA_PPP_UNIT_ID for specifying ppp unit id > > On Mon, Aug 09, 2021 at 09:31:09PM +0200, Pali Rohár wrote: > > Better to wait. I would like hear some comments / review on this patch > > if this is the correct approach as it adds a new API/ABI for userspace. > > Personally I don't understand the use case for setting the ppp unit at > creation time. I didn't implement it on purpose when creating the > netlink interface, as I didn't have any use case. > > On the other hand, adding the ppp unit in the netlink dump is probably > useful. >