aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp/sctp.h
diff options
context:
space:
mode:
authorNeil Horman <nhorman@tuxdriver.com>2007-08-15 19:07:44 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:48:09 -0400
commit4d93df0abd50b9c9e2d4561439a1a1d21ec5e68f (patch)
tree47e5bde0c37ed7ce68032ffa9110f252533fc710 /include/net/sctp/sctp.h
parent13c99b248f06e0b71d925f162d8e3b0084886a21 (diff)
[SCTP]: Rewrite of sctp buffer management code
This patch introduces autotuning to the sctp buffer management code similar to the TCP. The buffer space can be grown if the advertised receive window still has room. This might happen if small message sizes are used, which is common in telecom environmens. New tunables are introduced that provide limits to buffer growth and memory pressure is entered if to much buffer spaces is used. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sctp/sctp.h')
-rw-r--r--include/net/sctp/sctp.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index c9cc00c85782..d5a1ddc7483f 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -469,6 +469,11 @@ static inline void sctp_skb_set_owner_r(struct sk_buff *skb, struct sock *sk)
469 skb->sk = sk; 469 skb->sk = sk;
470 skb->destructor = sctp_sock_rfree; 470 skb->destructor = sctp_sock_rfree;
471 atomic_add(event->rmem_len, &sk->sk_rmem_alloc); 471 atomic_add(event->rmem_len, &sk->sk_rmem_alloc);
472 /*
473 * This mimics the behavior of
474 * sk_stream_set_owner_r
475 */
476 sk->sk_forward_alloc -= event->rmem_len;
472} 477}
473 478
474/* Tests if the list has one and only one entry. */ 479/* Tests if the list has one and only one entry. */