diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-08-29 01:15:54 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 19:13:46 -0400 |
commit | c530cfb1ce1e8f230744c3f3bd86771f50725053 (patch) | |
tree | 8309c7803ccb3cbbe07e610e6a0e5580a63d83e2 /net/dccp/output.c | |
parent | a84ffe430342db6ee585a5038f3242a6b4112d69 (diff) |
[CCID3]: Call sk->sk_write_space(sk) when receiving a feedback packet
This makes the send rate calculations behave way more closely to what
is specified, with the jitter previously seen on x and x_recv
disappearing completely on non lossy setups.
This resembles the tcp_data_snd_check code, that possibly we'll end up
using in DCCP as well, perhaps moving this code to
inet_connection_sock.
For now I'm doing the simplest implementation tho.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/output.c')
-rw-r--r-- | net/dccp/output.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/net/dccp/output.c b/net/dccp/output.c index 116f6db5678d..28de157a4326 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c | |||
@@ -150,6 +150,19 @@ unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu) | |||
150 | return mss_now; | 150 | return mss_now; |
151 | } | 151 | } |
152 | 152 | ||
153 | void dccp_write_space(struct sock *sk) | ||
154 | { | ||
155 | read_lock(&sk->sk_callback_lock); | ||
156 | |||
157 | if (sk->sk_sleep && waitqueue_active(sk->sk_sleep)) | ||
158 | wake_up_interruptible(sk->sk_sleep); | ||
159 | /* Should agree with poll, otherwise some programs break */ | ||
160 | if (sock_writeable(sk)) | ||
161 | sk_wake_async(sk, 2, POLL_OUT); | ||
162 | |||
163 | read_unlock(&sk->sk_callback_lock); | ||
164 | } | ||
165 | |||
153 | /** | 166 | /** |
154 | * dccp_wait_for_ccid - Wait for ccid to tell us we can send a packet | 167 | * dccp_wait_for_ccid - Wait for ccid to tell us we can send a packet |
155 | * @sk: socket to wait for | 168 | * @sk: socket to wait for |