From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 025BE3A6406 for ; Wed, 18 Mar 2026 09:49:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773827375; cv=none; b=OnvgfPhsQp2945Hjjhk0MDAI79aBZFJqNAdKgAHMtKyx3sL/QkwmjYPR76ZvYOl0DjJwlK15u8R3PykIorWtBrct36/WVkZXX7pQXaKsNquS9IRFxEY8CxJcROBqa2usPn2nw1HHs8M/nZ7b0S0bGVg2xNDpr8EceLMNJH7yrW8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773827375; c=relaxed/simple; bh=cTCC7w9f8PR0d94N69YTK7ENPP3u+ePq7cM2OGA7y/I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Jb4TXGakVb/9/w47DGdYkV+7O4kvy76stzC0+56g0M9c6vk8NfnoFh8fN2sTF9Kz1F4sMg2O4H/WGU8hoL3TJKE9MzfazDGoerEhBJ/hedRnTce1yRHwKN511V6zW5vOpsYIOx1vOgreEeVBS0rF9/Yz2x4uHYLx7QXYPi/3xDg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=PunQxi8A; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=CXQ8AVt4; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PunQxi8A"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="CXQ8AVt4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773827367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ePMb9OZqcDJWUHQOQ+oipDwj+1eLe3lTWhpodjf3fTo=; b=PunQxi8AlnoZRYDlVOCrpM0prPWo3e8mwvu2vtVG4oqsnXd6Vb/LURpFmf6U/z990j5fsr CVF44oNdVj6NyW0czWiKiQjSHIDQ7S1Vusin71NVjfkdTBWYIQqCK6BJ4BDRFAnIlJ0oj+ ppzYZtuI9iWwM3OGPJ68wjMIqC0i+i8= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-688-kdYXo77-MsuTK6KiwEMfww-1; Wed, 18 Mar 2026 05:49:26 -0400 X-MC-Unique: kdYXo77-MsuTK6KiwEMfww-1 X-Mimecast-MFC-AGG-ID: kdYXo77-MsuTK6KiwEMfww_1773827365 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-483786a09b1so67915495e9.3 for ; Wed, 18 Mar 2026 02:49:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1773827365; x=1774432165; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=ePMb9OZqcDJWUHQOQ+oipDwj+1eLe3lTWhpodjf3fTo=; b=CXQ8AVt4DuiJqBz7apb3zNQkgIQYowd5/04nR9SfMW5SLMNFsSb5JJMtPRiRsvasaL dG6G1CDuz4M6Nymxt6lGNZiLcp16y7Oli0Uu3g+apKt2KQe7UQgm34AiA3YR3tJ1C5vC bkVaPREnKJ8PAbTy0A3TEvUNnyDyNNIcKXF4fxqI5FANEZ39Yy4X45ncea90ymBW6BN2 VW47Sqs1ozzRTp9mJsFHxZRppi0P9ILbt+7jt6t/K0MVgs0LnnbHiCrcZaoYWO8TYsX1 ruRucYWYR/kOVaNXTCkjAoGH6BGr7q56RT/smTm7daO/5w76KpOR7Moq8w19uIqOb0fL vPmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773827365; x=1774432165; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ePMb9OZqcDJWUHQOQ+oipDwj+1eLe3lTWhpodjf3fTo=; b=C+GaZTPXXwtH2O+31Ov+VvNmBuMPjjbaIDUdGRC2Ik/tKXEJv6Hv7/zOjnHML2QA9F AoEkKmFf+o1ZRL6gvZMrb3XJ0Fp0XhoH1Sk4Q0UGA+RDCDvDVG5mGWTWwKTd7E6Qpk8z SAAtkYA06LTTg6OY+fQyqulE+k0L3ZW3xV3249sUx+gW6fmoPeK4V8V+Bg1+wZKgEMTx o2s9sHa+Ta9idezYYbnY2yWW3GL5AI3NKbG+DdttdfLy3INJP1+9IbC0nc2hN1MWUE0r GKM+OQIXLWMhB6wRNAMuf0+hjhs0a30NIyitU8IUybI358Y1HTBUR/XqqyVFNB4lFGN+ 4ylA== X-Forwarded-Encrypted: i=1; AJvYcCXOafu1mfalJQZiZaMa2ee8RJlOoQ/SP0THmXpMzq6ishUBzvOrqVWWRkfO+VDF1GOhsfp4yTp58y9eQak=@vger.kernel.org X-Gm-Message-State: AOJu0Yx0YxWUj97TJP/v5MOlwa2NvXxWWt6LaqtIXBNczwzsafrtSeRV ukZac7IKOcLbsMUzmmR1+SsqY2KLVIyNoCQ9T7KMjBCRYLMQN1Ox0k+1zmC+dFttvFChQdtj1WE RKVbgLNeovKBW0s/Uu99/savQFEzK9uO8L829bYprcMLWuOQ3SNPkxSryoLxJ+yi6ZA== X-Gm-Gg: ATEYQzyhcuV3yOCDN2j/UnTBCaCBwKha9RqDO+ustCW9aNQzVbvDyIRK8CyshLGcRnt z5PWLEugoN5/IMqouJWegzXW4uaC0WkIBwr4UvcssMncKQjSP9sGo2k8r4TU8mVflbxKA4dQjyF q9SI4kSRUBwk+8HyqwP4HItr9y8KVIflVFoyCUpQ8y2MuLkyTcwiL+NGblyoE+ajHsc+rEgJi0w 2XFgnzb1cl4C9MVR3aRXgV4PMe6r4VXz7g5wSc9Rp1zs4gy/N3NcBZBg6C+feqn6/Nb6sV+Dosy W+P5TmCBqzOp6+Gaa5K320051hTidqU3EoDAe6bVvZEzGHU235/GE2LIGTVLye2AjeaYQYS7nMC zCfPxGmMIxz8Q1iW+15rBwc0p1E6x3fpKf0tHp/P63O2j23jZ06ywFOZU+q+wlamC3DkID4ZNBf wH X-Received: by 2002:a05:600c:450c:b0:486:c4f0:1a37 with SMTP id 5b1f17b1804b1-486f4457a6fmr44895265e9.24.1773827365103; Wed, 18 Mar 2026 02:49:25 -0700 (PDT) X-Received: by 2002:a05:600c:450c:b0:486:c4f0:1a37 with SMTP id 5b1f17b1804b1-486f4457a6fmr44894965e9.24.1773827364655; Wed, 18 Mar 2026 02:49:24 -0700 (PDT) Received: from debian (2a01cb05923c9a0070912cd5af4725fd.ipv6.abo.wanadoo.fr. [2a01:cb05:923c:9a00:7091:2cd5:af47:25fd]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-486f4214664sm47282025e9.4.2026.03.18.02.49.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Mar 2026 02:49:23 -0700 (PDT) Date: Wed, 18 Mar 2026 10:49:21 +0100 From: Guillaume Nault To: Qingfang Deng Cc: Martin Olivier , netdev@vger.kernel.org, linux-ppp@vger.kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-kernel@vger.kernel.org, Pali =?iso-8859-1?Q?Roh=E1r?= , Paul Mackerras Subject: Re: [PATCH net-next v2] ppp: add IFLA_PPP_UNIT netlink attribute Message-ID: References: <20260318015937.239409-1-dqfext@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260318015937.239409-1-dqfext@gmail.com> On Wed, Mar 18, 2026 at 09:59:29AM +0800, Qingfang Deng wrote: > On Sat, 14 Mar 2026 02:14:29 +0100, Martin Olivier wrote: > > Currently, the PPP rtnetlink API allows creating a new network interface > > with a custom ifname, but it lacks the ability to specify a custom PPP > > unit id. > > > > Setting a specific unit id is currently only possible with the > > PPPIOCNEWUNIT ioctl. If a user-space program also requires a custom > > interface name, it must create the interface first with PPPIOCNEWUNIT > > and then rename it. > > > > Resolve this by introducing the IFLA_PPP_UNIT netlink attribute. This > > allows user-space programs to atomically request both a custom ifname > > and a specific PPP unit id during the RTM_NEWLINK creation process, > > eliminating the post-creation renaming for this use case. > > > > Signed-off-by: Martin Olivier > > --- > > Changes in v2: > > - use nl policy to set IFLA_PPP_UNIT min allowed value instead of a manual check in ppp_nl_validate() > > - use of nla_get_s32_default() to collect IFLA_PPP_UNIT value > > Link to v1: https://lore.kernel.org/netdev/PAWP192MB2411A5E7D3BE1B55E155A92F9747A@PAWP192MB2411.EURP192.PROD.OUTLOOK.COM/ > > The patch itself looks good to me, but I would like to check the > userspace changes too. Please create a pull request at > https://github.com/ppp-project/ppp/pulls > > +Cc: Paul Mackerras, Guillaume Nault, Pali Rohár As far as I understand, the original ioctl API allowed setting the unit id for only one reason: to allow userspace to influence the name of the ppp device to be created. The netlink interface on the other hand already allows to set the device name, without needing to play with the unit id. So what's the use case for setting the unit id with netlink? > Regards, > Qingfang >