Re: [PATCH bluetooth-next 3/3] ieee802154: allow netns create of lowpan interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 05/11/2016 07:14 PM, Michael Richardson wrote:
> Alexander Aring <aar@xxxxxxxxxxxxxx> wrote:
>     > This patch reverts commit f9d1ce8f81eb ("ieee802154: fix netns settings").
>     > The lowpan interface need to be created inside the net namespace where
>     > the wpan interface is available. The wpan namespace can be changed only
>     > by nl802154 before. Without this patch it's not possible to create a
>     > lowpan interface for a wpan interface which isn't inside init_net
>     > namespace.
> 
> I know that we can't support multiple lowpan interfaces on a single wpan
> at this time.  If one could, via a macvlan like way, would we want to
> put different lowpan interfaces in different netns on top of the same
> physical radio.
> 

mhh, this patch currently sets the whole phy into a namespace and all
related interfaces wpan/lowpan can only exists according the namespace
which the phy belongs to.

Running wpan interface in netns A and running the corresponding lowpan
interface in an another namespace sounds wrong for me, because they should
known each other.

btw: I tried to use "ip link set $WPAN/$LOWPAN netns $NETNS" doesn't work,
it returns -EINVAL.
I think this works only if we set some flags/callbacks, don't know but
was one of my test cases.

If running iwpan $PHY set netns name $NETNS, the wpan interface will
unregister(deleting lowpan) and will be registered again (inside
different namespace).

---

(Creating multiple lowpans for one wpan)

This can be done when creating two wpan interfaces according one phy.
The bad news is, you can't change the mac address stuff and I think this
isn't what you want. The reason is simple, most hardwares has one
address filtering setting only. You could have two wpan interfaces with
different address settings, but then one interface can be in up state only.

To avoid such behaviour, I had in my mind to simple go into promiscuous
mode if two wpan interfaces are up with different address settings, then
let do linux do all filtering stuff. I had to avoid that because the
hardware will not filtering anything anymore and linux need to do more
"work".

Maybe just go into promiscuous when it's necessary and print some
WARNING that the device going into promiscuous mode in such setup.

> I'm also ignorant here: can one create macvlan against a physical interface
> into a netns?
> 

What I googled is, yes that's possible. But they use "ip link set
$INTERFACE netns $NETNS" for that, I think we need to implement such
feature for wpan/lowpan stuff.

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. :-)

- Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux