OpenVZ Forum - RDF feed
type: channel
items: [PATCH] net: Add etun driver
items: Re: [PATCH] net: Add etun driver

[PATCH] net: Add etun driver
type: item
description: etun is a simple two headed tunnel driver that at the link layer looks like ethernet. It's target audience is communicating between network namespaces but it is general enough it has other valid uses as well. Ben Greear implemented a similar device called redir-dev, for network emulation. OpenVZ has a similar device that goes by the name veth. I didn't want to mess with ioctls or weird non-general network interfaces for creating devices, so I used sysfs as my control mechanism. To create a pair of devices called veth0 and veth1: echo -n 'veth0,veth1' > /sys/module/etun/parameters/newif To destroy a pair of devices: echo -n 'veth0' > /sys/module/etun/parameters/delif Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> --- drivers/net/Kconfig | 14 ++ drivers/net/Makefile | 1 + drivers/net/etun.c | 486 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 501 insertions(+), 0 deletions(-) create mode 100644 drivers/net/etun.c diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index c3f9f59..03cf13f 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -119,6 +119,20 @@ config TUN If you don't know what to use this for, you don't need it. +config ETUN + tristate "Ethernet tunnel device driver support" + depends on SYSFS + ---help--- + ETUN provices a pair of network devices that can be used for + configuring interesting topolgies. What one devices transmits + the other receives and vice versa. The link level framing + is ethernet for wide compatibility with network stacks. + + To compile this driver as a module, choose M here: the module + will be called etun. + + If you don't know what to use this for, you don't need it. + config NET_SB1000 tristate "General Instruments Surfboard 1000" depends on PNP diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 33af833..549ff3f 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -185,6 +185,7 @@ obj-$(CONFIG_MACSONIC) += macsonic.o obj-$(CONFIG_MACMACE) += macmace.o obj-$(CON…
creator: ebiederm
date: 2007-04-06T20:43:15-00:00

Re: [PATCH] net: Add etun driver
type: item
description: Patrick McHardy wrote: > It would be nice if someone would finally come up with a generic > interface based on netlink (RTM_NEWLINK) instead of adding yet > another couple of homegrown interfaces. My preference is for ioctls, procfs, or similar that does not require extra libraries. Ethtool is an ioctl based approach, so that could potentially be used, though I'm not sure if that's the right place to put it... Ben -- Ben Greear <greearb@candelatech.com> Candela Technologies Inc http://www.candelatech.com _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Ben Greear
date: 2007-04-09T18:14:52-00:00

Re: [PATCH] net: Add etun driver
type: item
description: From: Ben Greear <greearb@candelatech.com> Date: Mon, 09 Apr 2007 11:14:52 -0700 > Patrick McHardy wrote: > > > It would be nice if someone would finally come up with a generic > > interface based on netlink (RTM_NEWLINK) instead of adding yet > > another couple of homegrown interfaces. > > My preference is for ioctls, procfs, or similar that does not > require extra libraries. Ethtool is an ioctl based approach, > so that could potentially be used, though I'm not sure if > that's the right place to put it... I totally disagree. Netlink doesn't require libraries, the libraries just make using it easier. It's a simple protocol sent over a socket, if you include the right headers you can do it all yourself. We shouldn't fail to use our proper core network configuration interface just because it's inconvenient for you. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: davem
date: 2007-04-09T18:37:30-00:00

Re: [PATCH] net: Add etun driver
type: item
description: From: Patrick McHardy <kaber@trash.net> Date: Mon, 09 Apr 2007 18:58:13 +0200 > It would be nice if someone would finally come up with a generic > interface based on netlink (RTM_NEWLINK) instead of adding yet > another couple of homegrown interfaces. I absolutely agree, using these ioctls and sysfs/procfs crap is totally insane given that we have a core mechanism for network configuration. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: davem
date: 2007-04-09T18:44:02-00:00

Re: [PATCH] net: Add etun driver
type: item
description: Ben Greear wrote: > Patrick McHardy wrote: > >> It would be nice if someone would finally come up with a generic >> interface based on netlink (RTM_NEWLINK) instead of adding yet >> another couple of homegrown interfaces. > > > My preference is for ioctls, procfs, or similar that does not > require extra libraries. Ethtool is an ioctl based approach, > so that could potentially be used, though I'm not sure if > that's the right place to put it... Extra libraries is one of the least important points in my opinion, I also guess pretty much anyone using a software device already has iproute installed, which could easily support all of them. The more important things to consider are in my opinion extendability and atomicity of changes and dumps: - ioctls: atomicity, not easily extendable - sysfs: no atomicity, easily extendable - procfs: if atomicity not easily extendable, but can of course also be used similar to sysfs Only netlink offers both in an easy to use fashion and is already used for the main parts of network configuration anyway. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Patrick McHardy
date: 2007-04-09T18:45:51-00:00

Re: [PATCH] net: Add etun driver
type: item
description: David Miller wrote: > From: Ben Greear <greearb@candelatech.com> > Date: Mon, 09 Apr 2007 11:14:52 -0700 > >> Patrick McHardy wrote: >> >>> It would be nice if someone would finally come up with a generic >>> interface based on netlink (RTM_NEWLINK) instead of adding yet >>> another couple of homegrown interfaces. >> My preference is for ioctls, procfs, or similar that does not >> require extra libraries. Ethtool is an ioctl based approach, >> so that could potentially be used, though I'm not sure if >> that's the right place to put it... > > I totally disagree. > > Netlink doesn't require libraries, the libraries just make using it > easier. It's a simple protocol sent over a socket, if you include > the right headers you can do it all yourself. > > We shouldn't fail to use our proper core network configuration > interface just because it's inconvenient for you. Well, I find it inconvenient, so my preference is for other methods...that shouldn't be too supprising. I'm a lazy programmer after all! :) If it does get added, and something like 'ip' gains ability to use it, then I can just system("ip whatever"), so maybe that's the out for lazy programmers... Thanks, Ben -- Ben Greear <greearb@candelatech.com> Candela Technologies Inc http://www.candelatech.com _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Ben Greear
date: 2007-04-09T18:48:07-00:00

Re: [PATCH] net: Add etun driver
type: item
description: David Miller <davem@davemloft.net> writes: > From: Patrick McHardy <kaber@trash.net> > Date: Mon, 09 Apr 2007 18:58:13 +0200 > >> It would be nice if someone would finally come up with a generic >> interface based on netlink (RTM_NEWLINK) instead of adding yet >> another couple of homegrown interfaces. > > I absolutely agree, using these ioctls and sysfs/procfs crap > is totally insane given that we have a core mechanism for > network configuration. The core mechanism for network configuration does not support creating virtual devices in a extensible reusable way. In particular the tunnel types supported by iproute2 are hard coded into the user space tool and into the kernel interface. The interface seems to be not the least bit extensible for creating new types of non hardware backed network devices. So I don't see a readily usable mechanism for network configuration in netlink. The fact that netlink it uses unreliable packets and an asynchronous interface just adds to the difficulty in making use of it. Nor have I seen a rigorous adherence to all new network configuration using netlink. The wireless code doesn't even seem to really try. So I don't believe anyone has found a good maintainable, unix compatible configuration mechanism for maintaining anything yet. Regardless I really don't care what the interface is as long as people agree and I don't have to rewrite significant portions of user space to allow people to use it. Since whatever user space interface we pick we will be stuck with we might as well review it as closely as we can and figure out what we can live with. Just to be contrary I'm tempted to add a sysctl interface. No one has even mentioned class of user space interfaces yet. Eric _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-04-09T19:35:11-00:00

Re: [PATCH] net: Add etun driver
type: item
description: Eric W. Biederman wrote: > Nor have I seen a rigorous adherence to all new network configuration > using netlink. The wireless code doesn't even seem to really try. Not true: > commit 711e2c33ac9221a419a9e28d05dd78a6a9c5fd4d > Author: Jean Tourrilhes <jt@hpl.hp.com> > Date: Wed Feb 22 15:10:56 2006 -0800 > > [PATCH] WE-20 for kernel 2.6.16 > > This is version 20 of the Wireless Extensions. This is the > completion of the RtNetlink work I started early 2004, it enables the > full Wireless Extension API over RtNetlink. Though this is/was pulled, and the upcoming mac80211 configuration interface should have netlink support. This does not discount your other claims about netlink annoyances when used for interface configuration (unreliable, async, etc.), which I tend to agree with. Jeff _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Jeff Garzik
date: 2007-04-09T19:48:01-00:00

Re: [PATCH] net: Add etun driver
type: item
description: On Mon, 2007-04-09 at 13:35 -0600, Eric W. Biederman wrote: > > Nor have I seen a rigorous adherence to all new network configuration > using netlink. The wireless code doesn't even seem to really try. You're talking about the wext stuff that was invented ten years ago. cfg80211/nl80211 which I was talking about actually does use netlink almost exclusively (and you can add virtual interfaces using netlink) but we also provided some easy sysfs attributes. johannes _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Johannes Berg
date: 2007-04-09T20:03:54-00:00

Re: [PATCH] net: Add etun driver
type: item
description: Eric W. Biederman wrote: > The core mechanism for network configuration does not support creating > virtual devices in a extensible reusable way. > > In particular the tunnel types supported by iproute2 are hard coded > into the user space tool and into the kernel interface. The interface > seems to be not the least bit extensible for creating new types of > non hardware backed network devices. Yes, it sucks. > So I don't see a readily usable mechanism for network configuration in > netlink. Thats why I suggested that we should create one, ideally before adding more sysfs/proc/ioctl/... based interfaces, which we'll have a hard time getting rid of again. I could take care of this if you don't mind waiting until 2.6.23. > The fact that netlink it uses unreliable packets and an > asynchronous interface just adds to the difficulty in making use of > it. Its reliable on the userspace->kernel path as long as you don't use MSG_DONTWAIT. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Patrick McHardy
date: 2007-04-09T20:11:29-00:00

Re: [PATCH] net: Add etun driver
type: item
description: On Mon, 2007-04-09 at 22:11 +0200, Patrick McHardy wrote: > Thats why I suggested that we should create one, ideally before adding > more sysfs/proc/ioctl/... based interfaces, which we'll have a hard time > getting rid of again. But then how would we configure initial parameters along with creating the interface? That's something that's good to have, and I don't see how you can allow it generically. Then again, you can of course always add an interface and then change its operating parameters etc. but that isn't atomic any more. johannes _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Johannes Berg
date: 2007-04-09T20:29:17-00:00

Re: [PATCH] net: Add etun driver
type: item
description: Johannes Berg wrote: > On Mon, 2007-04-09 at 22:11 +0200, Patrick McHardy wrote: > > >>Thats why I suggested that we should create one, ideally before adding >>more sysfs/proc/ioctl/... based interfaces, which we'll have a hard time >>getting rid of again. > > > But then how would we configure initial parameters along with creating > the interface? That's something that's good to have, and I don't see how > you can allow it generically. > > Then again, you can of course always add an interface and then change > its operating parameters etc. but that isn't atomic any more. Same way as the current RTM_SETLINK message works, but with creating a new link in advance. It works fine in other subsystems, so I don't see why it would in this case as well. Some subsystems do it in an atomic fashion (network schedulers for example), some first create the object, then configure it (network classifiers in the non-compat cases). In the network device case I suppose the later should work fine since a device needs to be set UP in a second action before it really does anything. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Patrick McHardy
date: 2007-04-10T00:06:47-00:00

Re: [PATCH] net: Add etun driver
type: item
description: On Tue, 2007-04-10 at 02:06 +0200, Patrick McHardy wrote: > Same way as the current RTM_SETLINK message works, but with creating > a new link in advance. It works fine in other subsystems, so I don't > see why it would in this case as well. Some subsystems do it in an > atomic fashion (network schedulers for example), some first create > the object, then configure it (network classifiers in the non-compat > cases). In the network device case I suppose the later should work > fine since a device needs to be set UP in a second action before > it really does anything. Our virtual devices are always associated with a piece of hardware, and we really want them to be associated with that at all times, even when not UP. Everything else seems like a huge complication if only because then we can't have whoever will be responsible for the device allocate it's private space area. johannes _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Johannes Berg
date: 2007-04-10T05:47:08-00:00

Re: [PATCH] net: Add etun driver
type: item
description: Johannes Berg <johannes@sipsolutions.net> writes: > Our virtual devices are always associated with a piece of hardware, and > we really want them to be associated with that at all times, even when > not UP. Everything else seems like a huge complication if only because > then we can't have whoever will be responsible for the device allocate > it's private space area. How are you specifying which piece of hardware today? By interface name? What function do your virtual devices serve? I'm trying to wrap my head around the model. Eric _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: ebiederm
date: 2007-04-10T06:08:48-00:00

Re: [PATCH] net: Add etun driver
type: item
description: On Tue, 2007-04-10 at 00:08 -0600, Eric W. Biederman wrote: > How are you specifying which piece of hardware today? By interface name? By wiphy index, which is just the hardware identifier we give each 802.11 device present on the system (if it uses cfg80211) > What function do your virtual devices serve? Basically you can have a monitor, access point and WDS link running on the same 802.11 MAC at the same time and that's what we need to present, each one as a netdev. johannes _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Johannes Berg
date: 2007-04-10T06:18:56-00:00

Re: [PATCH] net: Add etun driver
type: item
description: Johannes Berg wrote: > Our virtual devices are always associated with a piece of hardware, and > we really want them to be associated with that at all times, even when > not UP. Everything else seems like a huge complication if only because > then we can't have whoever will be responsible for the device allocate > it's private space area. Shouldn't be a problem either. Creating the device atomically also prevents that anything else is setting them UP before they're fully configured. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Patrick McHardy
date: 2007-04-10T07:52:34-00:00

Re: [PATCH] net: Add etun driver
type: item
description: On Tue, 2007-04-10 at 09:52 +0200, Patrick McHardy wrote: > Shouldn't be a problem either. Creating the device atomically also > prevents that anything else is setting them UP before they're fully > configured. How would you do it generically then? I'm absolutely not opposed to the idea but for now haven't seen how to do it. johannes _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Johannes Berg
date: 2007-04-10T09:18:54-00:00

Re: [PATCH] net: Add etun driver
type: item
description: Johannes Berg wrote: > On Tue, 2007-04-10 at 09:52 +0200, Patrick McHardy wrote: > > >>Shouldn't be a problem either. Creating the device atomically also >>prevents that anything else is setting them UP before they're fully >>configured. > > > How would you do it generically then? I'm absolutely not opposed to the > idea but for now haven't seen how to do it. Without having thought much about it yet, roughly like this: - driver receives RTM_NEWLINK message (under rtnl) - driver allocates new device - driver initializes device based on content of RTM_NEWLINK message - driver returns Device creation won't be generic of course since only the driver knows how to do that. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Patrick McHardy
date: 2007-04-10T09:52:02-00:00

Re: [PATCH] net: Add etun driver
type: item
description: On Tue, 2007-04-10 at 11:52 +0200, Patrick McHardy wrote: > Without having thought much about it yet, roughly like this: > > - driver receives RTM_NEWLINK message (under rtnl) > - driver allocates new device > - driver initializes device based on content of RTM_NEWLINK message > - driver returns Sounds good to me, but where's the advantage over something that isn't generic if RTM_NEWLINK contains totally different things depending on the subsystem like wireless where it'd have to contain the hardware identifier? johannes _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Johannes Berg
date: 2007-04-10T10:27:59-00:00

Re: [PATCH] net: Add etun driver
type: item
description: Johannes Berg wrote: > On Tue, 2007-04-10 at 11:52 +0200, Patrick McHardy wrote: > > >>Without having thought much about it yet, roughly like this: >> >>- driver receives RTM_NEWLINK message (under rtnl) >>- driver allocates new device >>- driver initializes device based on content of RTM_NEWLINK message >>- driver returns > > > Sounds good to me, but where's the advantage over something that isn't > generic if RTM_NEWLINK contains totally different things depending on > the subsystem like wireless where it'd have to contain the hardware > identifier? Not totally different, so far I think we should use the same attributes as for RTM_SETLINK messages and include the device-specific stuff in IFLA_PROTINFO, which is symetric to what the kernel sends in RTM_NETLINK messages (see br_netlink.c for an example). The easiest case would be an empty IFLA_PROTINFO attribute, which would simply create a device without any configuration. The main advantage that we don't get more weird sysfs/proc/ioctl based interfaces and use the same interface that is used for all other network configuration, which f.e. will allow to add support for all software devices to iproute without much effort, so you don't need 30 different tools for configuring the different software device types anymore. Additionally we get atomic setup/dumps and extensibility. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Patrick McHardy
date: 2007-04-10T10:46:58-00:00

Re: [PATCH] net: Add etun driver
type: item
description: On Tue, 2007-04-10 at 12:46 +0200, Patrick McHardy wrote: > Not totally different, so far I think we should use the same attributes > as for RTM_SETLINK messages and include the device-specific stuff in > IFLA_PROTINFO, which is symetric to what the kernel sends in RTM_NETLINK > messages (see br_netlink.c for an example). The easiest case would be an > empty IFLA_PROTINFO attribute, which would simply create a device > without any configuration. I'll have to look up these things. > The main advantage that we don't get more weird sysfs/proc/ioctl based > interfaces Please don't put me into a corner I don't want to be in ;) The new wireless stuff was completely designed using netlink. The sysfs interface to these two specific things was a concession since it used to exist before and we don't really have a fully functional userspace tool yet. > and use the same interface that is used for all other network > configuration, which f.e. will allow to add support for all software > devices to iproute without much effort, so you don't need 30 different > tools for configuring the different software device types anymore. > Additionally we get atomic setup/dumps and extensibility. I don't think wireless can get away without a new tool. So much stuff there. Look at http://git.kernel.org/?p=linux/kernel/git/linville/wireless-dev.git;a=blob;f=include/linux/nl80211.h;hb=HEAD johannes _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Johannes Berg
date: 2007-04-10T11:02:10-00:00

Re: [PATCH] net: Add etun driver
type: item
description: Johannes Berg wrote: > On Tue, 2007-04-10 at 12:46 +0200, Patrick McHardy wrote: > > >>The main advantage that we don't get more weird sysfs/proc/ioctl based >>interfaces > > > Please don't put me into a corner I don't want to be in ;) The new > wireless stuff was completely designed using netlink. The sysfs > interface to these two specific things was a concession since it used to > exist before and we don't really have a fully functional userspace tool > yet. I know :) It was a few month ago when I noticed the new bonding sysfs interface when I first thought that we really need this. >> and use the same interface that is used for all other network >>configuration, which f.e. will allow to add support for all software >>devices to iproute without much effort, so you don't need 30 different >>tools for configuring the different software device types anymore. >>Additionally we get atomic setup/dumps and extensibility. > > > I don't think wireless can get away without a new tool. So much stuff > there. Look at > http://git.kernel.org/?p=linux/kernel/git/linville/wireless-dev.git;a=blob;f=include/linux/nl80211.h;hb=HEAD Maybe not wireless, but bonding, briding, vlan, etun, possibly more. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Patrick McHardy
date: 2007-04-10T11:09:20-00:00

Re: [PATCH] net: Add etun driver
type: item
description: Patrick McHardy wrote: > Maybe not wireless, but bonding, briding, vlan, etun, possibly more. [if I understand you correctly] I agree. With ethtool, the idea is to have a single tool that supports multiple hardware platforms -- even to the point of introducing hardware-specific code into ethtool. While I agree with wireless-dev that wireless /needs/ a separate tool, for things like bridging and vlan it would certainly be nice to mitigate the tool count explosion. Jeff _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Jeff Garzik
date: 2007-04-10T11:16:24-00:00

Re: [PATCH] net: Add etun driver
type: item
description: On Tue, 2007-04-10 at 13:09 +0200, Patrick McHardy wrote: > I know :) It was a few month ago when I noticed the new bonding > sysfs interface when I first thought that we really need this. :) > > I don't think wireless can get away without a new tool. So much stuff > > there. Look at > > http://git.kernel.org/?p=linux/kernel/git/linville/wireless-dev.git;a=blob;f=include/linux/nl80211.h;hb=HEAD > > > Maybe not wireless, but bonding, briding, vlan, etun, possibly more. Fair enough. Then the question however remains whether wireless should try to do all things it needs in one or try leveraging multiple things from other places. Thoughts? johannes _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Johannes Berg
date: 2007-04-10T11:24:57-00:00

Re: [PATCH] net: Add etun driver
type: item
description: Johannes Berg wrote: > Fair enough. Then the question however remains whether wireless should > try to do all things it needs in one or try leveraging multiple things > from other places. Thoughts? I know too little about wireless to judge really this. My opinion is that if it is possible to add and configure an interface (even if only for simple cases) without knowledge about driver internals by setting a few parameters, it would probably make sense to use RTM_NEWLINK as well. If a userspace daemon or complex knowledge of driver internals is needed, it probably should stay seperated. So simply put: if I can implement support for "ip wireless add dev wlan0 mode managed essid ... key ..." in less than 100 lines and get a working connection afterwards, it seems worth it. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Patrick McHardy
date: 2007-04-10T12:05:46-00:00

Re: [PATCH] net: Add etun driver
type: item
description: On Tue, Apr 10, 2007 at 02:05:46PM +0200, Patrick McHardy wrote: > So simply put: if I can implement support for > "ip wireless add dev wlan0 mode managed essid ... key ..." > in less than 100 lines and get a working connection afterwards, it > seems worth it. ACK -- John W. Linville linville@tuxdriver.com _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: linville
date: 2007-04-10T13:44:11-00:00

Re: [PATCH] net: Add etun driver
type: item
description: On Tue, 2007-04-10 at 14:05 +0200, Patrick McHardy wrote: > > I know too little about wireless to judge really this. My opinion is > that if it is possible to add and configure an interface (even if > only for simple cases) without knowledge about driver internals by > setting a few parameters, it would probably make sense to use > RTM_NEWLINK as well. If a userspace daemon or complex knowledge of > driver internals is needed, it probably should stay seperated. It still is though we're moving towards the userspace daemon thing. > So simply put: if I can implement support for > "ip wireless add dev wlan0 mode managed essid ... key ..." > in less than 100 lines and get a working connection afterwards, it > seems worth it. For completely open networks (no "key ...") or just WEP (static key) it could probably be done, but I don't see how right now. johannes _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Johannes Berg
date: 2007-04-10T13:48:08-00:00

Re: [PATCH] net: Add etun driver
type: item
description: On Tue, 2007-04-10 at 02:06 +0200, Patrick McHardy wrote: > Same way as the current RTM_SETLINK message works, but with creating > a new link in advance. It works fine in other subsystems, so I don't > see why it would in this case as well. Some subsystems do it in an > atomic fashion (network schedulers for example), some first create > the object, then configure it (network classifiers in the non-compat > cases). In the network device case I suppose the later should work > fine since a device needs to be set UP in a second action before > it really does anything. Looking at br_netlink.c it seems that this sort of contradicts why generic netlink was done, now all the sudden everything that wants to create new links need its own netlink protocol number, no? johannes _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Johannes Berg
date: 2007-04-10T21:16:59-00:00

Re: [PATCH] net: Add etun driver
type: item
description: Johannes Berg wrote: > On Tue, 2007-04-10 at 02:06 +0200, Patrick McHardy wrote: > > >>Same way as the current RTM_SETLINK message works, but with creating >>a new link in advance. It works fine in other subsystems, so I don't >>see why it would in this case as well. Some subsystems do it in an >>atomic fashion (network schedulers for example), some first create >>the object, then configure it (network classifiers in the non-compat >>cases). In the network device case I suppose the later should work >>fine since a device needs to be set UP in a second action before >>it really does anything. > > > Looking at br_netlink.c it seems that this sort of contradicts why > generic netlink was done, now all the sudden everything that wants to > create new links need its own netlink protocol number, no? No, generic netlink avoids allocating netlink families. br_netlink uses the same netlink family as the other network configuration stuff (NETLINK_ROUTE), but a different rtgen_family (which matches the address families). But you have a valid point, if we want to use this for things like bonding or VLAN that aren't actually address families, we should consider introducing "rtnetlink families" to avoid adding AF_BONDING, AF_8021Q etc. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Patrick McHardy
date: 2007-04-11T16:15:41-00:00

Re: [PATCH] net: Add etun driver
type: item
description: On Tue, 10 Apr 2007 23:16:59 +0200 Johannes Berg <johannes@sipsolutions.net> wrote: > On Tue, 2007-04-10 at 02:06 +0200, Patrick McHardy wrote: > > > Same way as the current RTM_SETLINK message works, but with creating > > a new link in advance. It works fine in other subsystems, so I don't > > see why it would in this case as well. Some subsystems do it in an > > atomic fashion (network schedulers for example), some first create > > the object, then configure it (network classifiers in the non-compat > > cases). In the network device case I suppose the later should work > > fine since a device needs to be set UP in a second action before > > it really does anything. > > Looking at br_netlink.c it seems that this sort of contradicts why > generic netlink was done, now all the sudden everything that wants to > create new links need its own netlink protocol number, no? > > johannes Bridging is different since there was already a bridge protocol number assigned, there was no point in doing generic netlink. --- Stephen Hemminger <shemminger@linux-foundation.org> - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Stephen Hemminger
date: 2007-04-11T16:16:06-00:00

Re: [PATCH] net: Add etun driver
type: item
description: On Wed, 2007-04-11 at 18:15 +0200, Patrick McHardy wrote: > No, generic netlink avoids allocating netlink families. Well, yes, I thought that was pretty much the point. :) > br_netlink > uses the same netlink family as the other network configuration stuff > (NETLINK_ROUTE), but a different rtgen_family (which matches the > address families). Ah ok. I got all the family types confused then. > But you have a valid point, if we want to use > this for things like bonding or VLAN that aren't actually address > families, we should consider introducing "rtnetlink families" to > avoid adding AF_BONDING, AF_8021Q etc. True. But this still doesn't help wireless which doesn't have either an rtnetlink family nor an address family since it uses generic netlink exclusively. johannes _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Johannes Berg
date: 2007-04-11T16:43:13-00:00

Re: [PATCH] net: Add etun driver
type: item
description: Johannes Berg wrote: > On Wed, 2007-04-11 at 18:15 +0200, Patrick McHardy wrote: > >> But you have a valid point, if we want to use >>this for things like bonding or VLAN that aren't actually address >>families, we should consider introducing "rtnetlink families" to >>avoid adding AF_BONDING, AF_8021Q etc. > > > True. > > But this still doesn't help wireless which doesn't have either an > rtnetlink family nor an address family since it uses generic netlink > exclusively. I'm not sure I'm following. I was under the impression that the conclusion of yesterdays discussion was that its probably not worth using rtnetlink for wireless so it will continue to use generic netlink exclusively, but even if that is wrong, nothing would prevent adding a "rtnetlink family" for wireless as well. The idea of introducing "rtnetlink families" is exactly to avoid adding real address families for things that don't have one to avoid possible conflicts with IANA allocated numbers. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Patrick McHardy
date: 2007-04-11T16:52:33-00:00

Re: [PATCH] net: Add etun driver
type: item
description: On Wed, 2007-04-11 at 18:52 +0200, Patrick McHardy wrote: > I'm not sure I'm following. I was under the impression that the > conclusion of yesterdays discussion was that its probably not > worth using rtnetlink for wireless so it will continue to use > generic netlink exclusively, but even if that is wrong, nothing > would prevent adding a "rtnetlink family" for wireless as well. Oh, ok. Yeah nothing stops us from doing that, of course. johannes _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Johannes Berg
date: 2007-04-11T16:59:12-00:00