Search Linux Wireless

Re: wireless vs. network namespaces (part II)

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

 



>> >  * ensure that all netdevs created for this wiphy will have the right
>> >    netns.
>> >
>> > The latter part I'm unsure on, alloc_netdev_mq seems to always use
>> > init_net so I can't put them into the right namespace to start with, but
>> > because they're all "in there together" I can't allow switching
>> > namespaces either.. Ideas?
>> 
>> alloc_netdev_mq doesn't register the device, so it is a matter of simply
>> changing the network device pointer after allocation and before registration.
>> 
>> We do this by default when we dynamically create network devices using
>> netlink.  see rtnl_create_link for an example.
>
> Ok. So I guess I'd want to write a wrapper for registering the netdev
> that puts it into the right namespace for the wireless hardware and sets
> the NETIF_F_NETNS_LOCAL flag.

> I'll have to experiment a bit I guess.

So you are looking at using NETIF_F_NETNS_LOCAL to indicate that you can't move
one of the devices?

There is an UNREGISTER_NETDEV event and a REGISTER_NETDEV event sent when a device
is moved between namespaces.  See:  dev_change_net_namespace.

I think you would want to look onto those and move one network device when you
move the other, without using NETIF_F_NETNS_LOCAL.

Deletion and creation we have definitely done with paired veth devices.  I haven't
looked at the migration case, but I with a little bit of guarding against recursion
it looks like it probably can be handled.  

Say trigger when your parnter device calls REGISTER_NETDEV in a different network
namespace?

Eric

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

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux