From patchwork Thu Apr 20 08:48:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dichtel X-Patchwork-Id: 13218159 X-Patchwork-Delegate: dsahern@gmail.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB423C77B73 for ; Thu, 20 Apr 2023 08:51:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234319AbjDTIvM (ORCPT ); Thu, 20 Apr 2023 04:51:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234538AbjDTIuc (ORCPT ); Thu, 20 Apr 2023 04:50:32 -0400 Received: from mail-lj1-x261.google.com (mail-lj1-x261.google.com [IPv6:2a00:1450:4864:20::261]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A4934695 for ; Thu, 20 Apr 2023 01:49:00 -0700 (PDT) Received: by mail-lj1-x261.google.com with SMTP id 38308e7fff4ca-2a8a5f6771fso3536111fa.3 for ; Thu, 20 Apr 2023 01:48:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; t=1681980536; x=1684572536; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GptZ9S2v2iuA/K48gnra10lLb8nRLcNTkLUfYfYQWOM=; b=OeCgu81ukC74eXoJKGi6a0tSm/uJS9mU3HxvRyPak3bI/oRt+1SBU4RrINk/ZX3SbP toHO9NiaN+HMJ4oPQBd4rVP9erg2g66kKsYopNNeKTZicFE63yHAfDW1UyxLXPOZiH31 5IBkLTUsVZUhw9OboIBkGqRPFMsTd6ml1KQBjyptccB0nqGENT5grY4aIUb8Y+TYDjlr 0BWubYwMT5TUy6ckgivuzsfNh2j5bOzv353LyLVO1vhBMbrzN13GuTmu1QYxFfiW3274 DMDDBKcVwErvFDJArINKjYgJhfs35OxPogc4vZwA02fdrxbCsZBdKoKqcCOopvPparAL +eWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681980536; x=1684572536; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GptZ9S2v2iuA/K48gnra10lLb8nRLcNTkLUfYfYQWOM=; b=dyu6ERw9sqKWVOFp3gBk7JlQdy3R46YZLPvVV75lSXX9UNr0IkxJkWocn24yz4YrLi pgQPdfA0YXN2DK3eCa+fQZhDIZuyqCcIjebGdnx1uSGOpQ+fmor6ErrY+JRWNLYqKyCK 8EtRfma38cBrIjmSRpz172Z5+VQPzX11VVyiXmdazvKw+bRcS/JQ2gwT52dA4SgHGWTc 5xWLoJrVRz4PI6Nxw7bUJ1ut7RA4yhJfd+LaBXpqO33w0TFAh9cBDPXyMroEbGkPTaDX 2v6pFXvyIT+yC9eLfCW8VNtB0edjHLC3oOcqAfwItBLxhmB8j3Nr+97GpDBYHVclQdU6 xwsw== X-Gm-Message-State: AAQBX9fijpqQu/TmS2fHLzFmxqSv7UY5L/FNTIJpmlQDpVkDIcp+NO5Z xXNnFskb3zMHapgfdG60QogNlWDz6nThxiZA3ufRAUpemYur7g== X-Google-Smtp-Source: AKy350ZDV9v7nYkfRvrxklfsEkH+GhXGhuDkTJUYcFDVIQY9sQM/sgraH4OHjGWCpgnbcatZjcq5ChI/Fz+Y X-Received: by 2002:ac2:5e84:0:b0:4e8:43e2:a8 with SMTP id b4-20020ac25e84000000b004e843e200a8mr277833lfq.8.1681980535572; Thu, 20 Apr 2023 01:48:55 -0700 (PDT) Received: from smtpservice.6wind.com ([185.13.181.2]) by smtp-relay.gmail.com with ESMTP id w16-20020a05651204d000b004eb093a41f4sm162904lfq.104.2023.04.20.01.48.55; Thu, 20 Apr 2023 01:48:55 -0700 (PDT) X-Relaying-Domain: 6wind.com Received: from bretzel (bretzel.dev.6wind.com [10.17.1.57]) by smtpservice.6wind.com (Postfix) with ESMTPS id 0F743601D3; Thu, 20 Apr 2023 10:48:55 +0200 (CEST) Received: from dichtel by bretzel with local (Exim 4.92) (envelope-from ) id 1ppPyI-0005bk-Uu; Thu, 20 Apr 2023 10:48:54 +0200 From: Nicolas Dichtel To: stephen@networkplumber.org Cc: netdev@vger.kernel.org, dsahern@gmail.com, Simon Horman , Nicolas Dichtel Subject: [PATCH iproute2 v2 1/2] iplink: use the same token NETNSNAME everywhere Date: Thu, 20 Apr 2023 10:48:48 +0200 Message-Id: <20230420084849.21506-2-nicolas.dichtel@6wind.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230420084849.21506-1-nicolas.dichtel@6wind.com> References: <20230420084849.21506-1-nicolas.dichtel@6wind.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: dsahern@gmail.com Use NETNSNAME everywhere to ensure consistency between man pages and help of the 'ip' command. Signed-off-by: Nicolas Dichtel --- ip/iplink.c | 4 ++-- man/man8/ip-link.8.in | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ip/iplink.c b/ip/iplink.c index a8da52f9f7ca..8755fa076dab 100644 --- a/ip/iplink.c +++ b/ip/iplink.c @@ -63,7 +63,7 @@ void iplink_usage(void) " [ mtu MTU ] [index IDX ]\n" " [ numtxqueues QUEUE_COUNT ]\n" " [ numrxqueues QUEUE_COUNT ]\n" - " [ netns { PID | NAME } ]\n" + " [ netns { PID | NETNSNAME } ]\n" " type TYPE [ ARGS ]\n" "\n" " ip link delete { DEVICE | dev DEVICE | group DEVGROUP } type TYPE [ ARGS ]\n" @@ -88,7 +88,7 @@ void iplink_usage(void) " [ address LLADDR ]\n" " [ broadcast LLADDR ]\n" " [ mtu MTU ]\n" - " [ netns { PID | NAME } ]\n" + " [ netns { PID | NETNSNAME } ]\n" " [ link-netns NAME | link-netnsid ID ]\n" " [ alias NAME ]\n" " [ vf NUM [ mac LLADDR ]\n" diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in index c8c656579364..a4e0c4030363 100644 --- a/man/man8/ip-link.8.in +++ b/man/man8/ip-link.8.in @@ -465,7 +465,7 @@ specifies the desired index of the new virtual device. The link creation fails, if the index is busy. .TP -.BI netns " { PID | NAME } " +.BI netns " { PID | NETNSNAME } " specifies the desired network namespace to create interface in. .TP From patchwork Thu Apr 20 08:48:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dichtel X-Patchwork-Id: 13218158 X-Patchwork-Delegate: dsahern@gmail.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93A5EC77B72 for ; Thu, 20 Apr 2023 08:51:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234167AbjDTIvK (ORCPT ); Thu, 20 Apr 2023 04:51:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234319AbjDTIub (ORCPT ); Thu, 20 Apr 2023 04:50:31 -0400 Received: from mail-ej1-x661.google.com (mail-ej1-x661.google.com [IPv6:2a00:1450:4864:20::661]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B3526EB3 for ; Thu, 20 Apr 2023 01:48:59 -0700 (PDT) Received: by mail-ej1-x661.google.com with SMTP id z6so4680958ejc.5 for ; Thu, 20 Apr 2023 01:48:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; t=1681980535; x=1684572535; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uIJ/jeWKp7SBrtxInDfs3IxO+7s3/ZCB6bYZXR/z3xs=; b=j7bhANNRoOY7704a7dpmLR0qpQsMi6JyZbzJQ5wf+uyJD+FrpD+ZF81Fdw6fhoY/T2 oSAkv50dXzz2rQbM2jZaUQoMVg5Ja97DYEDvkSYLBpQQNjQwGc8zkSff35VBMjK1NjJW MnwHVqY16ZV3ZrDx/PJd5lK1BhIBmdxaSDNVWtuSoopSql9EnDrs9lwvHwp2TxQ7Uc8Q gp7/RZ5sIWBEbvG0ANXJWCMh8cEQ0hbclbjrw/bb5Xz42FVUbqsh0luuNoyuzoSX7WvM Atz/wZI51S7rK5AaUWlVgP0l9kYUczhDb9u12qgnslB2513dCp601l64yuDZMHMzuLKh k5dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681980535; x=1684572535; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uIJ/jeWKp7SBrtxInDfs3IxO+7s3/ZCB6bYZXR/z3xs=; b=b/t4vDj+OOQcwfBOnAOd2AEWH3ew8003n4KnWyCLonygDJ5gZUxg1I633neLRGyWXt 4sOPuKahRNS3s5xf+8WwOzYloy199j0EjPqIG5j18qxAV4FggukV2r8ne6KpLugdBfc3 K2roZZrieScDaEM4UO2cLaIQbxYqEC7vPHweMPqIrZQNGq8cqGasIA+Th/CFbUhGCouw jN8j6/84n8H501IwGUEcKnyd18s3nGZxOQ1dYo6wMS/YD3lZ9c6KJxEq/FSAVgYQUJ1F VZmWctmSxWw3OME+YNXIhnQunBcfKiYPX+tmtb3SEDs16nJ7O7CyHZXdJvWudLc4Ork5 2hMg== X-Gm-Message-State: AAQBX9c9ZbAXAsIVCacdyjFjcBsAfrOtWZcQKighEcCMfErjQKExfkUy 1NogITgz8wceahhTc1eUVB8OXnIR0PHGDqp1bvaY97b9LY05gw== X-Google-Smtp-Source: AKy350a5+rS6GSBhPfP0AOyrD27QPm+SbxE/ySvWCZEPJbUrXFKqnfyqf0rlLRsHNm/Pe5pEGi1ap2mihqoA X-Received: by 2002:a17:906:dfef:b0:94a:a887:c29f with SMTP id lc15-20020a170906dfef00b0094aa887c29fmr805126ejc.68.1681980535319; Thu, 20 Apr 2023 01:48:55 -0700 (PDT) Received: from smtpservice.6wind.com ([185.13.181.2]) by smtp-relay.gmail.com with ESMTP id qw16-20020a1709066a1000b0094f62d46e4asm378239ejc.125.2023.04.20.01.48.55; Thu, 20 Apr 2023 01:48:55 -0700 (PDT) X-Relaying-Domain: 6wind.com Received: from bretzel (bretzel.dev.6wind.com [10.17.1.57]) by smtpservice.6wind.com (Postfix) with ESMTPS id 12741602A0; Thu, 20 Apr 2023 10:48:55 +0200 (CEST) Received: from dichtel by bretzel with local (Exim 4.92) (envelope-from ) id 1ppPyI-0005bn-VN; Thu, 20 Apr 2023 10:48:54 +0200 From: Nicolas Dichtel To: stephen@networkplumber.org Cc: netdev@vger.kernel.org, dsahern@gmail.com, Simon Horman , Nicolas Dichtel Subject: [PATCH iproute2 v2 2/2] iplink: fix help of 'netns' arg Date: Thu, 20 Apr 2023 10:48:49 +0200 Message-Id: <20230420084849.21506-3-nicolas.dichtel@6wind.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230420084849.21506-1-nicolas.dichtel@6wind.com> References: <20230420084849.21506-1-nicolas.dichtel@6wind.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: dsahern@gmail.com 'ip link set foo netns /proc/1/ns/net' is a valid command. Let's update the doc accordingly. Fixes: 0dc34c7713bb ("iproute2: Add processless network namespace support") Signed-off-by: Nicolas Dichtel --- ip/iplink.c | 4 ++-- man/man8/ip-link.8.in | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ip/iplink.c b/ip/iplink.c index 8755fa076dab..9ac3b8cb2ad5 100644 --- a/ip/iplink.c +++ b/ip/iplink.c @@ -63,7 +63,7 @@ void iplink_usage(void) " [ mtu MTU ] [index IDX ]\n" " [ numtxqueues QUEUE_COUNT ]\n" " [ numrxqueues QUEUE_COUNT ]\n" - " [ netns { PID | NETNSNAME } ]\n" + " [ netns { PID | NETNSNAME | NETNSFILE } ]\n" " type TYPE [ ARGS ]\n" "\n" " ip link delete { DEVICE | dev DEVICE | group DEVGROUP } type TYPE [ ARGS ]\n" @@ -88,7 +88,7 @@ void iplink_usage(void) " [ address LLADDR ]\n" " [ broadcast LLADDR ]\n" " [ mtu MTU ]\n" - " [ netns { PID | NETNSNAME } ]\n" + " [ netns { PID | NETNSNAME | NETNSFILE } ]\n" " [ link-netns NAME | link-netnsid ID ]\n" " [ alias NAME ]\n" " [ vf NUM [ mac LLADDR ]\n" diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in index a4e0c4030363..59deaa2c1263 100644 --- a/man/man8/ip-link.8.in +++ b/man/man8/ip-link.8.in @@ -49,7 +49,7 @@ ip-link \- network device configuration .IR BYTES " ]" .br .RB "[ " netns " {" -.IR PID " | " NETNSNAME " } ]" +.IR PID " | " NETNSNAME " | " NETNSFILE " } ]" .br .BI type " TYPE" .RI "[ " ARGS " ]" @@ -118,7 +118,7 @@ ip-link \- network device configuration .IR MTU " ]" .br .RB "[ " netns " {" -.IR PID " | " NETNSNAME " } ]" +.IR PID " | " NETNSNAME " | " NETNSFILE " } ]" .br .RB "[ " link-netnsid .IR ID " ]" @@ -465,7 +465,7 @@ specifies the desired index of the new virtual device. The link creation fails, if the index is busy. .TP -.BI netns " { PID | NETNSNAME } " +.BI netns " { PID | NETNSNAME | NETNSFILE } " specifies the desired network namespace to create interface in. .TP @@ -2188,9 +2188,11 @@ the interface is .IR "POINTOPOINT" . .TP -.BI netns " NETNSNAME " \fR| " PID" +.BI netns " NETNSNAME " \fR| " NETNSFILE " \fR| " PID" move the device to the network namespace associated with name .IR "NETNSNAME " or +the file +.IR "NETNSFILE " or .RI process " PID". Some devices are not allowed to change network namespace: loopback, bridge,