]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/net/if_inet6.h
ipv6: mcast: RCU conversion
[net-next-2.6.git] / include / net / if_inet6.h
index 545d8b059bef227b5e97cb8060982ee7363e8a91..04977eefb0eedf8a174529a44ea3e4b3ddadd13f 100644 (file)
 
 #ifdef __KERNEL__
 
+enum {
+       INET6_IFADDR_STATE_DAD,
+       INET6_IFADDR_STATE_POSTDAD,
+       INET6_IFADDR_STATE_UP,
+       INET6_IFADDR_STATE_DEAD,
+};
+
 struct inet6_ifaddr {
        struct in6_addr         addr;
        __u32                   prefix_len;
@@ -40,6 +47,9 @@ struct inet6_ifaddr {
        __u32                   prefered_lft;
        atomic_t                refcnt;
        spinlock_t              lock;
+       spinlock_t              state_lock;
+
+       int                     state;
 
        __u8                    probes;
        __u8                    flags;
@@ -54,16 +64,15 @@ struct inet6_ifaddr {
        struct inet6_dev        *idev;
        struct rt6_info         *rt;
 
-       struct inet6_ifaddr     *lst_next;      /* next addr in addr_lst */
-       struct inet6_ifaddr     *if_next;       /* next addr in inet6_dev */
+       struct hlist_node       addr_lst;
+       struct list_head        if_list;
 
 #ifdef CONFIG_IPV6_PRIVACY
-       struct inet6_ifaddr     *tmp_next;      /* next addr in tempaddr_lst */
+       struct list_head        tmp_list;
        struct inet6_ifaddr     *ifpub;
        int                     regen_count;
 #endif
-
-       int                     dead;
+       struct rcu_head         rcu;
 };
 
 struct ip6_sf_socklist {
@@ -80,10 +89,11 @@ struct ip6_sf_socklist {
 struct ipv6_mc_socklist {
        struct in6_addr         addr;
        int                     ifindex;
-       struct ipv6_mc_socklist *next;
+       struct ipv6_mc_socklist __rcu *next;
        rwlock_t                sflock;
        unsigned int            sfmode;         /* MCAST_{INCLUDE,EXCLUDE} */
        struct ip6_sf_socklist  *sflist;
+       struct rcu_head         rcu;
 };
 
 struct ip6_sf_list {
@@ -151,9 +161,9 @@ struct ipv6_devstat {
 };
 
 struct inet6_dev {
-       struct net_device               *dev;
+       struct net_device       *dev;
 
-       struct inet6_ifaddr     *addr_list;
+       struct list_head        addr_list;
 
        struct ifmcaddr6        *mc_list;
        struct ifmcaddr6        *mc_tomb;
@@ -175,7 +185,7 @@ struct inet6_dev {
 #ifdef CONFIG_IPV6_PRIVACY
        u8                      rndid[8];
        struct timer_list       regen_timer;
-       struct inet6_ifaddr     *tempaddr_list;
+       struct list_head        tempaddr_list;
 #endif
 
        struct neigh_parms      *nd_parms;