From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Alexander Aring <aar@pengutronix.de>,
Michael Richardson <mcr@sandelman.ca>
Cc: linux-wpan@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH bluetooth-next 3/3] ieee802154: allow netns create of lowpan interface
Date: Thu, 12 May 2016 09:28:31 +0200 [thread overview]
Message-ID: <5734309F.4040805@6wind.com> (raw)
In-Reply-To: <ac0713b7-c28c-4edc-c35a-b5afeaf1cbcd@pengutronix.de>
Le 12/05/2016 01:34, Alexander Aring a écrit :
[snip]
> But I don't know how it works when the $PHY isn't visible inside the
> namespace where the interface should be changed to. But wireless should
> have the same behaviour then, that the macvlan/veth/etc. the corresponding
> wireless phy isn't visible in the namespace. Seems there exists some
> "parent" device inside one namespace and macvlan/veth can be moved to
> other namespaces, but I am not an expert into that. :-)
Yes, the virtual interface (macvlan/veth,ip tunnels, vxlan, etc.) is created in
the namespace of the physical netns. After, the virtual interface is moved to
another netns (with 'ip link set foo netns bar'). This is called x-netns: the
upper par of the interface and the link part are not in the same netns.
With 'ip -d link' it's possible to show the link netns. There is an nsid which
identified the link netns. The nsid is valid only in the current netns (ie the
same netns can have another nsid in another netns).
Usually, there are explicit boundary in the code when crossing netns (see
skb_scrub_packet for example).
Example with a gre interface:
# create a gre interface in netns1
ip netns exec netns1 ip link add dev tun1 type gre local 10.0.0.1 \
remote 10.0.0.2
# move it in netns2: the link netns is still in netns1
ip netns exec netns1 ip link set tun1 netns netns2
or (completely equivalent):
# assign a nsid to netns1 in netns2
ip exec netns2 ip netns set netns1 1234
# create a gre interface in netns2 with its link netns in netns1
ip exec netns2 ip link add tun1 link-netnsid 1234 type gre local 10.0.0.1 \
remote 10.0.0.2
next prev parent reply other threads:[~2016-05-12 7:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 9:44 [PATCH bluetooth-next 1/3] nl802154: move PAD to right position Alexander Aring
2016-05-11 9:44 ` [PATCH bluetooth-next 2/3] ieee802154: add netns support Alexander Aring
2016-05-11 15:28 ` Stefan Schmidt
2016-05-12 0:14 ` Alexander Aring
2016-05-11 9:44 ` [PATCH bluetooth-next 3/3] ieee802154: allow netns create of lowpan interface Alexander Aring
2016-05-11 15:19 ` Stefan Schmidt
2016-05-11 17:14 ` Michael Richardson
2016-05-11 23:34 ` Alexander Aring
2016-05-12 7:28 ` Nicolas Dichtel [this message]
2016-05-13 12:27 ` Alexander Aring
2016-05-17 21:50 ` Alexander Aring
2016-05-11 14:32 ` [PATCH bluetooth-next 1/3] nl802154: move PAD to right position Nicolas Dichtel
2016-05-11 15:18 ` Stefan Schmidt
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=5734309F.4040805@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=aar@pengutronix.de \
--cc=kernel@pengutronix.de \
--cc=linux-wpan@vger.kernel.org \
--cc=mcr@sandelman.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.