X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fvserver%2Fnetwork.h;h=a89265d3d0d11f0dc47e3532de41bed9314c8f24;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=b3c39b062a320a7e9c6dff4a3cf8012f3a9189fa;hpb=b76fcd5f0c655b6e3e9bf534594357025421c66a;p=linux-2.6.git diff --git a/include/linux/vserver/network.h b/include/linux/vserver/network.h index b3c39b062..a89265d3d 100644 --- a/include/linux/vserver/network.h +++ b/include/linux/vserver/network.h @@ -3,7 +3,7 @@ #define MAX_N_CONTEXT 65535 /* Arbitrary limit */ -#define IP_DYNAMIC_ID ((uint32_t)-1) /* id for dynamic context */ +#define NX_DYNAMIC_ID ((uint32_t)-1) /* id for dynamic context */ #define NB_IPV4ROOT 16 @@ -12,14 +12,17 @@ #include #include #include +#include #include #include struct nx_info { - struct list_head nx_list; /* linked list of nxinfos */ + struct hlist_node nx_hlist; /* linked list of nxinfos */ + struct rcu_head nx_rcu; /* the rcu head */ nid_t nx_id; /* vnet id */ - atomic_t nx_refcount; + atomic_t nx_usecnt; /* usage count */ + atomic_t nx_refcnt; /* reference count */ uint64_t nx_flags; /* network flag word */ uint64_t nx_ncaps; /* network capabilities */ @@ -38,15 +41,18 @@ struct nx_info { }; -extern spinlock_t nxlist_lock; -extern struct list_head nx_infos; +struct rcu_head; +extern void rcu_free_nx_info(struct rcu_head *); +extern void unhash_nx_info(struct nx_info *); -void free_nx_info(struct nx_info *); -struct nx_info *create_nx_info(void); +extern struct nx_info *locate_nx_info(int); +extern struct nx_info *locate_or_create_nx_info(int); -extern struct nx_info *find_nx_info(int); -extern int nx_info_id_valid(int); +extern int get_nid_list(int, unsigned int *, int); +extern int nx_info_is_hashed(nid_t); + +extern int nx_migrate_task(struct task_struct *, struct nx_info *); struct in_ifaddr; struct net_device;