I found an issue with -rt patch. It is that netstat doesn't show
IPv6 sockets in ESTABLISHED state. This issue happens because a
flag bit of ebitmask is not set when the IPv6 socket connection
is established.
The fix is to set the flag bit in __inet6_hash().
Signed-off-by: Masayuki Nakagawa <[EMAIL PROTECTED]>
Index: linus-kernel.git/net/ipv6/inet6_hashtables.c
===================================================================
--- linus-kernel.git.orig/net/ipv6/inet6_hashtables.c
+++ linus-kernel.git/net/ipv6/inet6_hashtables.c
@@ -27,6 +27,8 @@ void __inet6_hash(struct inet_hashinfo *
{
struct hlist_head *list;
rwlock_t *lock;
+ unsigned long *bitmask = NULL;
+ unsigned int index = 0;
BUG_TRAP(sk_unhashed(sk));
@@ -35,15 +37,16 @@ void __inet6_hash(struct inet_hashinfo *
lock = &hashinfo->lhash_lock;
inet_listen_wlock(hashinfo);
} else {
- unsigned int hash;
- sk->sk_hash = hash = inet6_sk_ehashfn(sk);
- hash &= (hashinfo->ehash_size - 1);
- list = &hashinfo->ehash[hash].chain;
- lock = &hashinfo->ehash[hash].lock;
+ sk->sk_hash = inet6_sk_ehashfn(sk);
+ index = inet_ehash_index(hashinfo, sk->sk_hash);
+ list = &hashinfo->ehash[index].chain;
+ lock = &hashinfo->ehash[index].lock;
+ bitmask = hashinfo->ebitmask;
write_lock(lock);
}
__sk_add_node(sk, list);
+ __inet_hash_setbit(bitmask, index);
sock_prot_inc_use(sk->sk_prot);
write_unlock(lock);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html