All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] Allow to set net namespace for wireless device via RTM_LINK
@ 2014-09-11 20:35 Vadim Kochan
  2014-09-18 21:25   ` Johannes Berg
  0 siblings, 1 reply; 17+ messages in thread
From: Vadim Kochan @ 2014-09-11 20:35 UTC (permalink / raw)
  To: netdev; +Cc: linux-wireless, Vadim Kochan

Added new netdev_ops callback for setting namespace in specific
for this device way

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
---
 include/linux/netdevice.h | 4 ++++
 include/net/cfg80211.h    | 3 +++
 net/core/rtnetlink.c      | 7 ++++++-
 net/mac80211/iface.c      | 6 ++++++
 net/wireless/core.c       | 8 ++++++--
 5 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index ba72f6b..e5cc49c 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -997,6 +997,8 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
  *	Callback to use for xmit over the accelerated station. This
  *	is used in place of ndo_start_xmit on accelerated net
  *	devices.
+ * int (*ndo_set_netns)(struct net_device *dev, struct net *net);
+ *      Callback to set net namespace in specific way for this device.
  */
 struct net_device_ops {
 	int			(*ndo_init)(struct net_device *dev);
@@ -1146,6 +1148,8 @@ struct net_device_ops {
 							struct net_device *dev,
 							void *priv);
 	int			(*ndo_get_lock_subclass)(struct net_device *dev);
+	int			(*ndo_set_netns)(struct net_device *dev,
+							struct net *net);
 };
 
 /**
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index ab21299..853f97c 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4844,6 +4844,9 @@ void cfg80211_shutdown_all_interfaces(struct wiphy *wiphy);
 /* ethtool helper */
 void cfg80211_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info);
 
+/* cfg80211_wiphy_switch_netns - switch wiphy dev to net namespace */
+int cfg80211_wiphy_switch_netns(struct wiphy *wiphy, struct net *net);
+
 /* Logging, debugging and troubleshooting/diagnostic helpers. */
 
 /* wiphy_printk helpers, similar to dev_printk */
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index a688268..3c2e5e3 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1501,7 +1501,12 @@ static int do_setlink(const struct sk_buff *skb,
 			err = -EPERM;
 			goto errout;
 		}
-		err = dev_change_net_namespace(dev, net, ifname);
+
+		if (dev->netdev_ops->ndo_set_netns)
+			err = dev->netdev_ops->ndo_set_netns(dev, net);
+		else
+			err = dev_change_net_namespace(dev, net, ifname);
+
 		put_net(net);
 		if (err)
 			goto errout;
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index f75e5f1..7d60367 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1080,6 +1080,11 @@ static u16 ieee80211_netdev_select_queue(struct net_device *dev,
 	return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb);
 }
 
+static int ieee80211_set_netns(struct net_device *dev, struct net *net)
+{
+	return cfg80211_wiphy_switch_netns(dev->ieee80211_ptr->wiphy, net);
+}
+
 static const struct net_device_ops ieee80211_dataif_ops = {
 	.ndo_open		= ieee80211_open,
 	.ndo_stop		= ieee80211_stop,
@@ -1089,6 +1094,7 @@ static const struct net_device_ops ieee80211_dataif_ops = {
 	.ndo_change_mtu 	= ieee80211_change_mtu,
 	.ndo_set_mac_address 	= ieee80211_change_mac,
 	.ndo_select_queue	= ieee80211_netdev_select_queue,
+	.ndo_set_netns		= ieee80211_set_netns,
 };
 
 static u16 ieee80211_monitor_select_queue(struct net_device *dev,
diff --git a/net/wireless/core.c b/net/wireless/core.c
index c6620aa..f4742e7 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -179,6 +179,12 @@ int cfg80211_switch_netns(struct cfg80211_registered_device *rdev,
 	return 0;
 }
 
+int cfg80211_wiphy_switch_netns(struct wiphy *wiphy, struct net *net)
+{
+	return cfg80211_switch_netns(wiphy_to_rdev(wiphy), net);
+}
+EXPORT_SYMBOL(cfg80211_wiphy_switch_netns);
+
 static void cfg80211_rfkill_poll(struct rfkill *rfkill, void *data)
 {
 	struct cfg80211_registered_device *rdev = data;
@@ -898,8 +904,6 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
 		wdev->identifier = ++rdev->wdev_id;
 		list_add_rcu(&wdev->list, &rdev->wdev_list);
 		rdev->devlist_generation++;
-		/* can only change netns with wiphy */
-		dev->features |= NETIF_F_NETNS_LOCAL;
 
 		if (sysfs_create_link(&dev->dev.kobj, &rdev->wiphy.dev.kobj,
 				      "phy80211")) {
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH net-next] Allow to set net namespace for wireless device via RTM_LINK
@ 2014-09-18 21:25   ` Johannes Berg
  0 siblings, 0 replies; 17+ messages in thread
From: Johannes Berg @ 2014-09-18 21:25 UTC (permalink / raw)
  To: Vadim Kochan; +Cc: netdev, linux-wireless

On Thu, 2014-09-11 at 23:35 +0300, Vadim Kochan wrote:
> Added new netdev_ops callback for setting namespace in specific
> for this device way

> +++ b/include/linux/netdevice.h
> @@ -997,6 +997,8 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
>   *	Callback to use for xmit over the accelerated station. This
>   *	is used in place of ndo_start_xmit on accelerated net
>   *	devices.
> + * int (*ndo_set_netns)(struct net_device *dev, struct net *net);
> + *      Callback to set net namespace in specific way for this device.

For the record, I don't consider it appropriate to set the net namespace
on one netdev and end up with multiple netdevs switching namespaces ...

As a result, I don't think this should done.

johannes


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH net-next] Allow to set net namespace for wireless device via RTM_LINK
@ 2014-09-18 21:25   ` Johannes Berg
  0 siblings, 0 replies; 17+ messages in thread
From: Johannes Berg @ 2014-09-18 21:25 UTC (permalink / raw)
  To: Vadim Kochan
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-wireless-u79uwXL29TY76Z2rM5mHXA

On Thu, 2014-09-11 at 23:35 +0300, Vadim Kochan wrote:
> Added new netdev_ops callback for setting namespace in specific
> for this device way

> +++ b/include/linux/netdevice.h
> @@ -997,6 +997,8 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
>   *	Callback to use for xmit over the accelerated station. This
>   *	is used in place of ndo_start_xmit on accelerated net
>   *	devices.
> + * int (*ndo_set_netns)(struct net_device *dev, struct net *net);
> + *      Callback to set net namespace in specific way for this device.

For the record, I don't consider it appropriate to set the net namespace
on one netdev and end up with multiple netdevs switching namespaces ...

As a result, I don't think this should done.

johannes

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH net-next] Allow to set net namespace for wireless device via RTM_LINK
  2014-09-18 21:25   ` Johannes Berg
  (?)
@ 2014-10-14 12:16   ` vadim4j
  2014-10-20  9:47       ` Johannes Berg
  -1 siblings, 1 reply; 17+ messages in thread
From: vadim4j @ 2014-10-14 12:16 UTC (permalink / raw)
  To: Johannes Berg; +Cc: netdev, linux-wireless

On Thu, Sep 18, 2014 at 11:25:35PM +0200, Johannes Berg wrote:
> On Thu, 2014-09-11 at 23:35 +0300, Vadim Kochan wrote:
> > Added new netdev_ops callback for setting namespace in specific
> > for this device way
> 
> > +++ b/include/linux/netdevice.h
> > @@ -997,6 +997,8 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
> >   *	Callback to use for xmit over the accelerated station. This
> >   *	is used in place of ndo_start_xmit on accelerated net
> >   *	devices.
> > + * int (*ndo_set_netns)(struct net_device *dev, struct net *net);
> > + *      Callback to set net namespace in specific way for this device.
> 
> For the record, I don't consider it appropriate to set the net namespace
> on one netdev and end up with multiple netdevs switching namespaces ...
> 
> As a result, I don't think this should done.
> 
> johannes
> 

The reason for this was to make possible to change netns for wireless
dev via 'ip link' too like for 'iw' util. I just think that changing
namespace for netdev should have the generic way. May be you can suggest
a better way

Thanks,

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH net-next] Allow to set net namespace for wireless device via RTM_LINK
@ 2014-10-20  9:47       ` Johannes Berg
  0 siblings, 0 replies; 17+ messages in thread
From: Johannes Berg @ 2014-10-20  9:47 UTC (permalink / raw)
  To: vadim4j; +Cc: netdev, linux-wireless

On Tue, 2014-10-14 at 15:16 +0300, vadim4j@gmail.com wrote:

> The reason for this was to make possible to change netns for wireless
> dev via 'ip link' too like for 'iw' util. I just think that changing
> namespace for netdev should have the generic way. May be you can suggest
> a better way

That's a respectable goal, but I think you're way overshooting it and
thus getting it wrong. You're changing the semantics from

 "please switch this interface to that other netns"

to
 "please switch this interface *and all others on this HW* to that other
netns"

which is, in my opinion, something so much more unexpected and prone to
breaking people's setups than returning "not supported" here.

johannes


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH net-next] Allow to set net namespace for wireless device via RTM_LINK
@ 2014-10-20  9:47       ` Johannes Berg
  0 siblings, 0 replies; 17+ messages in thread
From: Johannes Berg @ 2014-10-20  9:47 UTC (permalink / raw)
  To: vadim4j-Re5JQEeQqe8AvxtiuMwx3w
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-wireless-u79uwXL29TY76Z2rM5mHXA

On Tue, 2014-10-14 at 15:16 +0300, vadim4j-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:

> The reason for this was to make possible to change netns for wireless
> dev via 'ip link' too like for 'iw' util. I just think that changing
> namespace for netdev should have the generic way. May be you can suggest
> a better way

That's a respectable goal, but I think you're way overshooting it and
thus getting it wrong. You're changing the semantics from

 "please switch this interface to that other netns"

to
 "please switch this interface *and all others on this HW* to that other
netns"

which is, in my opinion, something so much more unexpected and prone to
breaking people's setups than returning "not supported" here.

johannes

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH net-next] Allow to set net namespace for wireless device via RTM_LINK
@ 2014-10-20 10:46         ` Marcel Holtmann
  0 siblings, 0 replies; 17+ messages in thread
From: Marcel Holtmann @ 2014-10-20 10:46 UTC (permalink / raw)
  To: Johannes Berg; +Cc: vadim4j, netdev, linux-wireless

Hi Johannes,

>> The reason for this was to make possible to change netns for wireless
>> dev via 'ip link' too like for 'iw' util. I just think that changing
>> namespace for netdev should have the generic way. May be you can suggest
>> a better way
> 
> That's a respectable goal, but I think you're way overshooting it and
> thus getting it wrong. You're changing the semantics from
> 
> "please switch this interface to that other netns"
> 
> to
> "please switch this interface *and all others on this HW* to that other
> netns"
> 
> which is, in my opinion, something so much more unexpected and prone to
> breaking people's setups than returning "not supported" here.

this is just me thinking out loud and by no means any recommendation on doing this. I am not even sure this is a good idea.

Maybe relaxing the check and allow ip link to move a wireless netdev into a namespace (and having the wiphy follow) could be allowed if it is the only netdev or the original wlan0 that each wiphy creates. I really do not know if this is worth it, but for some simpler container cases it could be beneficial if RTNL can be used instead of having to go through nl80211.

Regards

Marcel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH net-next] Allow to set net namespace for wireless device via RTM_LINK
@ 2014-10-20 10:46         ` Marcel Holtmann
  0 siblings, 0 replies; 17+ messages in thread
From: Marcel Holtmann @ 2014-10-20 10:46 UTC (permalink / raw)
  To: Johannes Berg
  Cc: vadim4j-Re5JQEeQqe8AvxtiuMwx3w, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

Hi Johannes,

>> The reason for this was to make possible to change netns for wireless
>> dev via 'ip link' too like for 'iw' util. I just think that changing
>> namespace for netdev should have the generic way. May be you can suggest
>> a better way
> 
> That's a respectable goal, but I think you're way overshooting it and
> thus getting it wrong. You're changing the semantics from
> 
> "please switch this interface to that other netns"
> 
> to
> "please switch this interface *and all others on this HW* to that other
> netns"
> 
> which is, in my opinion, something so much more unexpected and prone to
> breaking people's setups than returning "not supported" here.

this is just me thinking out loud and by no means any recommendation on doing this. I am not even sure this is a good idea.

Maybe relaxing the check and allow ip link to move a wireless netdev into a namespace (and having the wiphy follow) could be allowed if it is the only netdev or the original wlan0 that each wiphy creates. I really do not know if this is worth it, but for some simpler container cases it could be beneficial if RTNL can be used instead of having to go through nl80211.

Regards

Marcel

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH net-next] Allow to set net namespace for wireless device via RTM_LINK
@ 2014-10-20 10:52           ` Johannes Berg
  0 siblings, 0 replies; 17+ messages in thread
From: Johannes Berg @ 2014-10-20 10:52 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: vadim4j, netdev, linux-wireless

On Mon, 2014-10-20 at 12:46 +0200, Marcel Holtmann wrote:

> Maybe relaxing the check and allow ip link to move a wireless netdev
> into a namespace (and having the wiphy follow) could be allowed if it
> is the only netdev or the original wlan0 that each wiphy creates. I
> really do not know if this is worth it, but for some simpler container
> cases it could be beneficial if RTNL can be used instead of having to
> go through nl80211.

The thought crossed my mind, but

1) it's relatively complex, though by no means impossible
2) it still moves more than you bargained for, since in theory the wiphy
could be
   used to create new interfaces etc.

That said, I'm much more inclined to believe such a patch would be
worthwhile than the original.

johannes


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH net-next] Allow to set net namespace for wireless device via RTM_LINK
@ 2014-10-20 10:52           ` Johannes Berg
  0 siblings, 0 replies; 17+ messages in thread
From: Johannes Berg @ 2014-10-20 10:52 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: vadim4j-Re5JQEeQqe8AvxtiuMwx3w, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

On Mon, 2014-10-20 at 12:46 +0200, Marcel Holtmann wrote:

> Maybe relaxing the check and allow ip link to move a wireless netdev
> into a namespace (and having the wiphy follow) could be allowed if it
> is the only netdev or the original wlan0 that each wiphy creates. I
> really do not know if this is worth it, but for some simpler container
> cases it could be beneficial if RTNL can be used instead of having to
> go through nl80211.

The thought crossed my mind, but

1) it's relatively complex, though by no means impossible
2) it still moves more than you bargained for, since in theory the wiphy
could be
   used to create new interfaces etc.

That said, I'm much more inclined to believe such a patch would be
worthwhile than the original.

johannes

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH net-next] Allow to set net namespace for wireless device via RTM_LINK
  2014-10-20 10:52           ` Johannes Berg
  (?)
@ 2014-12-24  9:48           ` Vadim Kochan
  2015-01-05  9:22               ` Johannes Berg
  -1 siblings, 1 reply; 17+ messages in thread
From: Vadim Kochan @ 2014-12-24  9:48 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Marcel Holtmann, netdev, linux-wireless

On Mon, Oct 20, 2014 at 1:52 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Mon, 2014-10-20 at 12:46 +0200, Marcel Holtmann wrote:
>
>> Maybe relaxing the check and allow ip link to move a wireless netdev
>> into a namespace (and having the wiphy follow) could be allowed if it
>> is the only netdev or the original wlan0 that each wiphy creates. I
>> really do not know if this is worth it, but for some simpler container
>> cases it could be beneficial if RTNL can be used instead of having to
>> go through nl80211.
>
> The thought crossed my mind, but
>
> 1) it's relatively complex, though by no means impossible
> 2) it still moves more than you bargained for, since in theory the wiphy
> could be
>    used to create new interfaces etc.
>
> That said, I'm much more inclined to believe such a patch would be
> worthwhile than the original.
>
> johannes
>

Hi Johannes,

What about the following thoughts:

    1) Set NETIF_F_NETNS_LOCAL for phy wireless device only if there
is at least one virtual interface which was created on it
    2) What about to inherit netns for newer created interfaces from
the phy device ?

Thanks,

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH net-next] Allow to set net namespace for wireless device via RTM_LINK
@ 2015-01-05  9:22               ` Johannes Berg
  0 siblings, 0 replies; 17+ messages in thread
From: Johannes Berg @ 2015-01-05  9:22 UTC (permalink / raw)
  To: Vadim Kochan; +Cc: Marcel Holtmann, netdev, linux-wireless

On Wed, 2014-12-24 at 11:48 +0200, Vadim Kochan wrote:

>     1) Set NETIF_F_NETNS_LOCAL for phy wireless device only if there
> is at least one virtual interface which was created on it

You mean at least two? I'd think the behaviour becomes hard to predict,
but I guess ultimately that'd be somewhat reasonable.

>     2) What about to inherit netns for newer created interfaces from
> the phy device ?

Hmm? This already happens - a given phy is only in a single netns and
all interfaces must be created in the same netns.

johannes


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH net-next] Allow to set net namespace for wireless device via RTM_LINK
@ 2015-01-05  9:22               ` Johannes Berg
  0 siblings, 0 replies; 17+ messages in thread
From: Johannes Berg @ 2015-01-05  9:22 UTC (permalink / raw)
  To: Vadim Kochan
  Cc: Marcel Holtmann, netdev-u79uwXL29TY76Z2rM5mHXA, linux-wireless

On Wed, 2014-12-24 at 11:48 +0200, Vadim Kochan wrote:

>     1) Set NETIF_F_NETNS_LOCAL for phy wireless device only if there
> is at least one virtual interface which was created on it

You mean at least two? I'd think the behaviour becomes hard to predict,
but I guess ultimately that'd be somewhat reasonable.

>     2) What about to inherit netns for newer created interfaces from
> the phy device ?

Hmm? This already happens - a given phy is only in a single netns and
all interfaces must be created in the same netns.

johannes

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH net-next] Allow to set net namespace for wireless device via RTM_LINK
  2015-01-05  9:22               ` Johannes Berg
  (?)
@ 2015-01-12  9:07               ` Vadim Kochan
  2015-01-12  9:42                 ` Johannes Berg
  -1 siblings, 1 reply; 17+ messages in thread
From: Vadim Kochan @ 2015-01-12  9:07 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Marcel Holtmann, linux-wireless

On Mon, Jan 5, 2015 at 11:22 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Wed, 2014-12-24 at 11:48 +0200, Vadim Kochan wrote:
>
>>     1) Set NETIF_F_NETNS_LOCAL for phy wireless device only if there
>> is at least one virtual interface which was created on it
>
> You mean at least two? I'd think the behaviour becomes hard to predict,
> but I guess ultimately that'd be somewhat reasonable.
>
>>     2) What about to inherit netns for newer created interfaces from
>> the phy device ?
>
> Hmm? This already happens - a given phy is only in a single netns and
> all interfaces must be created in the same netns.
>
> johannes
>
Hi,

Would you please explain why wireless devs related to the same phy
can't live in separated network namespaces ?

Thanks,

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH net-next] Allow to set net namespace for wireless device via RTM_LINK
  2015-01-12  9:07               ` Vadim Kochan
@ 2015-01-12  9:42                 ` Johannes Berg
  2015-01-12  9:57                   ` Vadim Kochan
  0 siblings, 1 reply; 17+ messages in thread
From: Johannes Berg @ 2015-01-12  9:42 UTC (permalink / raw)
  To: Vadim Kochan; +Cc: Marcel Holtmann, linux-wireless

On Mon, 2015-01-12 at 11:07 +0200, Vadim Kochan wrote:

> Would you please explain why wireless devs related to the same phy
> can't live in separated network namespaces ?

Well, they interact very deeply, for example the # of virtual interfaces
is often severely limited, and they often have to be using a single
channel, etc. It thus doesn't really make sense to try to separate them.

Also, if you really want to use it reliably, you should use a single
hostapd or wpa_supplicant process controlling all virtual interfaces,
which clearly isn't possible in multiple network namespaces.

johannes


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH net-next] Allow to set net namespace for wireless device via RTM_LINK
  2015-01-12  9:42                 ` Johannes Berg
@ 2015-01-12  9:57                   ` Vadim Kochan
  2015-01-12  9:58                     ` Johannes Berg
  0 siblings, 1 reply; 17+ messages in thread
From: Vadim Kochan @ 2015-01-12  9:57 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Marcel Holtmann, linux-wireless

Thank you! Seems reasonably for me.

The question is not related to the thread:
     May be this is not very good idea to copy behavior from other
tools but what do you think about
     add the same ability to use named network namespaces as it is
done in iproute2 - from /var/run/netns ?

Thanks,

On Mon, Jan 12, 2015 at 11:42 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Mon, 2015-01-12 at 11:07 +0200, Vadim Kochan wrote:
>
>> Would you please explain why wireless devs related to the same phy
>> can't live in separated network namespaces ?
>
> Well, they interact very deeply, for example the # of virtual interfaces
> is often severely limited, and they often have to be using a single
> channel, etc. It thus doesn't really make sense to try to separate them.
>
> Also, if you really want to use it reliably, you should use a single
> hostapd or wpa_supplicant process controlling all virtual interfaces,
> which clearly isn't possible in multiple network namespaces.
>
> johannes
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH net-next] Allow to set net namespace for wireless device via RTM_LINK
  2015-01-12  9:57                   ` Vadim Kochan
@ 2015-01-12  9:58                     ` Johannes Berg
  0 siblings, 0 replies; 17+ messages in thread
From: Johannes Berg @ 2015-01-12  9:58 UTC (permalink / raw)
  To: Vadim Kochan; +Cc: Marcel Holtmann, linux-wireless

On Mon, 2015-01-12 at 11:57 +0200, Vadim Kochan wrote:
> Thank you! Seems reasonably for me.
> 
> The question is not related to the thread:
>      May be this is not very good idea to copy behavior from other
> tools but what do you think about
>      add the same ability to use named network namespaces as it is
> done in iproute2 - from /var/run/netns ?

I have no objection to that of course - I believe it didn't exist back
when I wrote this code, or at least I didn't know about it then :)

johannes


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-01-12  9:58 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-11 20:35 [PATCH net-next] Allow to set net namespace for wireless device via RTM_LINK Vadim Kochan
2014-09-18 21:25 ` Johannes Berg
2014-09-18 21:25   ` Johannes Berg
2014-10-14 12:16   ` vadim4j
2014-10-20  9:47     ` Johannes Berg
2014-10-20  9:47       ` Johannes Berg
2014-10-20 10:46       ` Marcel Holtmann
2014-10-20 10:46         ` Marcel Holtmann
2014-10-20 10:52         ` Johannes Berg
2014-10-20 10:52           ` Johannes Berg
2014-12-24  9:48           ` Vadim Kochan
2015-01-05  9:22             ` Johannes Berg
2015-01-05  9:22               ` Johannes Berg
2015-01-12  9:07               ` Vadim Kochan
2015-01-12  9:42                 ` Johannes Berg
2015-01-12  9:57                   ` Vadim Kochan
2015-01-12  9:58                     ` Johannes Berg

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.