]> Pileus Git - ~andy/linux/commit
[SCTP]: sctp doesn't show all associations/endpoints in /proc
authorVlad Yasevich <vladislav.yasevich@hp.com>
Tue, 17 Jan 2006 19:53:06 +0000 (11:53 -0800)
committerSridhar Samudrala <sri@us.ibm.com>
Tue, 17 Jan 2006 19:53:06 +0000 (11:53 -0800)
commit49392e5ecf608da6770fd8723b534a0fc851edc4
tree9d7484b86d279bee8e5612ce4bf6dae4efc3f1f7
parent9834a2bb4970547540222fcba04e0a37d04cb0a0
[SCTP]: sctp doesn't show all associations/endpoints in /proc

When creating a very large number of associations (and endpoints),
/proc/assocs and /proc/eps will not show all of them.  As a result
netstat will not show all of the either.  This is particularly evident
when creating 1000+ associations (or endpoints).  As an example with
1500 tcp style associations over loopback, netstat showed 1420 on my
system instead of 3000.

The reason for this is that the seq_operations start method is invoked
multiple times bacause of the amount of data that is provided.  The
start method always increments the position parameter and since we use
the position as the hash bucket id, we end up skipping hash buckets.

This patch corrects this situation and get's rid of the silly hash-1
decrement.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
net/sctp/proc.c