From: Eric W. Biederman Date: Wed, 12 Sep 2007 09:56:32 +0000 (+0200) Subject: [NET]: Add a network namespace tag to struct net_device X-Git-Tag: v2.6.24-rc1~1454^2~702 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=4a1c537113cdc688aabc3fb9bb6ed18ec821c779;p=linux-2.6-omap-h63xx.git [NET]: Add a network namespace tag to struct net_device Please note that network devices do not increase the count count on the network namespace. The are inside the network namespace and so the network namespace tag is in the nature of a back pointer and so getting and putting the network namespace is unnecessary. Signed-off-by: Eric W. Biederman Signed-off-by: David S. Miller --- diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 8f00bdf95ef..dc3c15b726b 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -41,6 +41,7 @@ #include #include +struct net; struct vlan_group; struct ethtool_ops; struct netpoll_info; @@ -663,6 +664,9 @@ struct net_device void (*poll_controller)(struct net_device *dev); #endif + /* Network namespace this network device is inside */ + struct net *nd_net; + /* bridge stuff */ struct net_bridge_port *br_port; /* macvlan */