diff options
author | Hideo Aoki <haoki@redhat.com> | 2007-12-31 03:29:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:00:19 -0500 |
commit | 95766fff6b9a78d11fc2d3812dd035381690b55d (patch) | |
tree | c1ec9386a3d9a76a9f74bd230d3e7d4ee8059c51 /net/ipv4/af_inet.c | |
parent | 3ab224be6d69de912ee21302745ea45a99274dbc (diff) |
[UDP]: Add memory accounting.
Signed-off-by: Takahiro Yasui <tyasui@redhat.com>
Signed-off-by: Hideo Aoki <haoki@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r-- | net/ipv4/af_inet.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 03633b7b9b4a..0e12cf646071 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -139,6 +139,8 @@ void inet_sock_destruct(struct sock *sk) | |||
139 | __skb_queue_purge(&sk->sk_receive_queue); | 139 | __skb_queue_purge(&sk->sk_receive_queue); |
140 | __skb_queue_purge(&sk->sk_error_queue); | 140 | __skb_queue_purge(&sk->sk_error_queue); |
141 | 141 | ||
142 | sk_mem_reclaim(sk); | ||
143 | |||
142 | if (sk->sk_type == SOCK_STREAM && sk->sk_state != TCP_CLOSE) { | 144 | if (sk->sk_type == SOCK_STREAM && sk->sk_state != TCP_CLOSE) { |
143 | printk("Attempt to release TCP socket in state %d %p\n", | 145 | printk("Attempt to release TCP socket in state %d %p\n", |
144 | sk->sk_state, sk); | 146 | sk->sk_state, sk); |
@@ -1417,6 +1419,9 @@ static int __init inet_init(void) | |||
1417 | /* Setup TCP slab cache for open requests. */ | 1419 | /* Setup TCP slab cache for open requests. */ |
1418 | tcp_init(); | 1420 | tcp_init(); |
1419 | 1421 | ||
1422 | /* Setup UDP memory threshold */ | ||
1423 | udp_init(); | ||
1424 | |||
1420 | /* Add UDP-Lite (RFC 3828) */ | 1425 | /* Add UDP-Lite (RFC 3828) */ |
1421 | udplite4_register(); | 1426 | udplite4_register(); |
1422 | 1427 | ||