Mark Lord <lkml@xxxxxx> writes:..
Arjan van de Ven wrote:On Sat, 01 Dec 2007 15:21:12 -0500..
Mark Lord <lkml@xxxxxx> wrote:
Eric W. Biederman wrote:network drivers probably really really don't want to callStephen Hemminger <shemminger@xxxxxxxxxxxxxxxxxxxx> writes:..
Sure. We keep the updated dev_get_by_XXXX that takes a network
namespace parameter.
And what should code be passing in when "# CONFIG_NET_NS is not set" ?
dev_get_by_XXX...
Fine. But all of them want to call sk_alloc(),
network drivers should be calling sk_alloc less then they should
call dev_get_by_XXXX. Only protocols call sk_alloc.
..And what should code be passing in when "# CONFIG_NET_NS is not set" ?
..and many want to do register_netdev().
I haven't even touched register_netdev.
@@ -3361,6 +3595,8 @@ int register_netdevice(struct net_device *dev)..
/* When net_device's are persistent, this will be fatal. */
BUG_ON(dev->reg_state != NETREG_UNINITIALIZED);
+ BUG_ON(!dev->nd_net);
+ net = dev->nd_net;
spin_lock_init(&dev->queue_lock);
spin_lock_init(&dev->_xmit_lock);
..So what should they be using there ?
What are you having problems with?