Skip to content

Commit

Permalink
[NET]: Add a network namespace tag to struct net_device
Browse files Browse the repository at this point in the history
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 <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric W. Biederman authored and David S. Miller committed Oct 10, 2007
1 parent 772698f commit 4a1c537
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <linux/dmaengine.h>
#include <linux/workqueue.h>

struct net;
struct vlan_group;
struct ethtool_ops;
struct netpoll_info;
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 4a1c537

Please sign in to comment.