]> 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 13f9fc086d54ad484b62c62bc9e6db0bf6d9c99e..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;
@@ -62,8 +72,6 @@ struct inet6_ifaddr {
        struct inet6_ifaddr     *ifpub;
        int                     regen_count;
 #endif
-
-       int                     dead;
        struct rcu_head         rcu;
 };
 
@@ -81,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 {