]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: Rework the tsn map to use generic bitmap.
authorVlad Yasevich <vladislav.yasevich@hp.com>
Wed, 8 Oct 2008 21:18:39 +0000 (14:18 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Oct 2008 21:18:39 +0000 (14:18 -0700)
commit7b53037e5d2a5d9102aecca7d07b61d75180caf9
tree8dace1db660d555eb6e020f301fdfe6cf6c05b80
parent73f00f5e848b8dc16cd15a32f719821c896991d7
sctp: Rework the tsn map to use generic bitmap.

The tsn map currently use is 4K large and is stuck inside
the sctp_association structure making memory references REALLY
expensive.  What we really need is at most 4K worth of bits
so the biggest map we would have is 512 bytes.   Also, the
map is only really usefull when we have gaps to store and
report.  As such, starting with minimal map of say 32 TSNs (bits)
should be enough for normal low-loss operations.  We can grow
the map by some multiple of 32 along with some extra room any
time we receive the TSN which would put us outside of the map
boundry.  As we close gaps, we can shift the map to rebase
it on the latest TSN we've seen.  This saves 4088 bytes per
association just in the map alone along savings from the now
unnecessary structure members.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sctp/constants.h
include/net/sctp/structs.h
include/net/sctp/tsnmap.h
net/sctp/associola.c
net/sctp/sm_make_chunk.c
net/sctp/sm_sideeffect.c
net/sctp/tsnmap.c
net/sctp/ulpevent.c