From: Nicolas Dichtel <nicolas.dichtel@6wind•com>
To: Stephen Hemminger <stephen@networkplumber•org>
Cc: netdev@vger•kernel.org, dsahern@gmail•com, Petr Oros <poros@redhat•com>
Subject: Re: [PATCH iproute2] ipnetns: enable to dump nsid conversion table
Date: Tue, 15 Oct 2019 09:33:24 +0200 [thread overview]
Message-ID: <0983aadc-7375-75c7-e8ed-b2f8213e1bca@6wind.com> (raw)
In-Reply-To: <20191014131500.7dd2b1a8@hermes.lan>
Le 14/10/2019 à 22:15, Stephen Hemminger a écrit :
> On Mon, 7 Oct 2019 15:44:47 +0200
> Nicolas Dichtel <nicolas.dichtel@6wind•com> wrote:
>
>> This patch enables to dump/get nsid from a netns into another netns.
>>
>> Example:
>> $ ./test.sh
>> + ip netns add foo
>> + ip netns add bar
>> + touch /var/run/netns/init_net
>> + mount --bind /proc/1/ns/net /var/run/netns/init_net
>> + ip netns set init_net 11
>> + ip netns set foo 12
>> + ip netns set bar 13
>> + ip netns
>> init_net (id: 11)
>> bar (id: 13)
>> foo (id: 12)
>> + ip -n foo netns set init_net 21
>> + ip -n foo netns set foo 22
>> + ip -n foo netns set bar 23
>> + ip -n foo netns
>> init_net (id: 21)
>> bar (id: 23)
>> foo (id: 22)
>> + ip -n bar netns set init_net 31
>> + ip -n bar netns set foo 32
>> + ip -n bar netns set bar 33
>> + ip -n bar netns
>> init_net (id: 31)
>> bar (id: 33)
>> foo (id: 32)
>> + ip netns list-id target-nsid 12
>> nsid 21 current-nsid 11 (iproute2 netns name: init_net)
>> nsid 22 current-nsid 12 (iproute2 netns name: foo)
>> nsid 23 current-nsid 13 (iproute2 netns name: bar)
>> + ip -n foo netns list-id target-nsid 21
>> nsid 11 current-nsid 21 (iproute2 netns name: init_net)
>> nsid 12 current-nsid 22 (iproute2 netns name: foo)
>> nsid 13 current-nsid 23 (iproute2 netns name: bar)
>> + ip -n bar netns list-id target-nsid 33 nsid 32
>> nsid 32 current-nsid 32 (iproute2 netns name: foo)
>> + ip -n bar netns list-id target-nsid 31 nsid 32
>> nsid 12 current-nsid 32 (iproute2 netns name: foo)
>> + ip netns list-id nsid 13
>> nsid 13 (iproute2 netns name: bar)
>>
>> CC: Petr Oros <poros@redhat•com>
>> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind•com>
>> ---
>> include/libnetlink.h | 5 +-
>> ip/ip_common.h | 1 +
>> ip/ipnetns.c | 115 +++++++++++++++++++++++++++++++++++++++++--
>> lib/libnetlink.c | 15 ++++--
>> 4 files changed, 126 insertions(+), 10 deletions(-)
>>
>
> Applied. Please send another patch to update man page.
>
Yes, I will do.
I don't see the patch on kernel.org, am I missing something?
Thank you,
Nicolas
next prev parent reply other threads:[~2019-10-15 7:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-07 13:44 [PATCH iproute2] ipnetns: enable to dump nsid conversion table Nicolas Dichtel
2019-10-07 14:32 ` Petr Oros
2019-10-14 20:15 ` Stephen Hemminger
2019-10-15 7:33 ` Nicolas Dichtel [this message]
2019-10-15 16:25 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0983aadc-7375-75c7-e8ed-b2f8213e1bca@6wind.com \
--to=nicolas.dichtel@6wind$(echo .)com \
--cc=dsahern@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=poros@redhat$(echo .)com \
--cc=stephen@networkplumber$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox