iplink: update doc related to the 'netns' arg
Subsystems (2)
v3 cover iplink: update doc related to the 'netns' arg
v2 -> v3:
- make doc about netns arg consistent between 'add' and 'set'
v1 -> v2:
- add patch 1/2
- s/NETNS_FILE/NETNSFILE
- describe NETNSNAME in the DESCRIPTION section of man pages
ip/iplink.c | 4 ++-- man/man8/ip-link.8.in | 26 +++++++++++++++++++------- 2 files changed, 21 insertions(+), 9 deletions(-)
Regards,
Nicolas
PATCH v3 1/2 iplink: use the same token NETNSNAME everywhere
Use NETNSNAME everywhere to ensure consistency between man pages and help of the 'ip' command.
--- ip/iplink.c | 4 ++-- man/man8/ip-link.8.in | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
ip/iplink.c +2 -2
@@ -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"
man/man8/ip-link.8.in +1 -1
@@ -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
Signature · 1 line
2.39.2
Re: [PATCH iproute2 v3 1/2] iplink: use the same token NETNSNAME everywhere
Quoted 4 lines · Nicolas Dichtel
Use NETNSNAME everywhere to ensure consistency between man pages and help of the 'ip' command.
Signed-off-by Nicolas Dichtel <[email protected]>
PATCH v3 2/2 iplink: fix help of 'netns' arg
In reply to Nicolas Dichtel'ip link set foo netns /proc/1/ns/net' is a valid command. Let's update the doc accordingly.
--- ip/iplink.c | 4 ++-- man/man8/ip-link.8.in | 26 +++++++++++++++++++------- 2 files changed, 21 insertions(+), 9 deletions(-)
ip/iplink.c +2 -2
@@ -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"
man/man8/ip-link.8.in +19 -7
@@ -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,8 +465,15 @@ specifies the desired index of the new virtual device. The link creation fails, if the index is busy. .TP -.BI netns " { PID | NETNSNAME } " -specifies the desired network namespace to create interface in. +.B netns +.RI "{ " PID " | " NETNSNAME " | " NETNSFILE " }" +.br +create the device in the network namespace associated with process +.IR "PID " or +the name +.IR "NETNSNAME " or +the file +.IR "NETNSFILE". .TP VLAN Type Support
@@ -2188,10 +2195,15 @@ the interface is .IR "POINTOPOINT" . .TP -.BI netns " NETNSNAME " \fR| " PID" -move the device to the network namespace associated with name +.B netns +.RI "{ " PID " | " NETNSNAME " | " NETNSFILE " }" +.br +move the device to the network namespace associated with process +.IR "PID " or +the name .IR "NETNSNAME " or -.RI process " PID". +the file +.IR "NETNSFILE". Some devices are not allowed to change network namespace: loopback, bridge, wireless. These are network namespace local devices. In such case
Signature · 1 line
2.39.2
Re: [PATCH iproute2 v3 2/2] iplink: fix help of 'netns' arg
Quoted 5 lines · Nicolas Dichtel
'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 <[email protected]>
Re: [PATCH iproute2 v3 2/2] iplink: fix help of 'netns' arg
In reply to Nicolas DichtelSalut Nicolas,
Quoted 6 lines · Nicolas Dichtel
'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 <[email protected]>
Thanks for the doc update.
Signature · 1 line
David Marchand
Quoted 8 lines · Nicolas Dichtel
v2 -> v3:
- make doc about netns arg consistent between 'add' and 'set'v1 -> v2:
- add patch 1/2
- s/NETNS_FILE/NETNSFILE
- describe NETNSNAME in the DESCRIPTION section of man pages
Quoted 7 lines
ip/iplink.c | 4 ++-- man/man8/ip-link.8.in | 26 +++++++++++++++++++------- 2 files changed, 21 insertions(+), 9 deletions(-)Regards,
Nicolas
This series was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:
Hello:
This series was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:
Quoted 9 lines · On Fri, 21 Apr 2023 09:47:18 +0200 you wrote:
v2 -> v3:
- make doc about netns arg consistent between 'add' and 'set'v1 -> v2:
- add patch 1/2
- s/NETNS_FILE/NETNSFILE
- describe NETNSNAME in the DESCRIPTION section of man pages[...]
Here is the summary with links:
- [iproute2,v3,1/2] iplink: use the same token NETNSNAME everywhere
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=3921f56ec3be - [iproute2,v3,2/2] iplink: fix help of 'netns' arg https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=1371d7deaa20
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html