From c530cfb1ce1e8f230744c3f3bd86771f50725053 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Mon, 29 Aug 2005 02:15:54 -0300 Subject: [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 Signed-off-by: David S. Miller --- net/dccp/output.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'net/dccp/output.c') diff --git a/net/dccp/output.c b/net/dccp/output.c index 116f6db5678..28de157a432 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) return mss_now; } +void dccp_write_space(struct sock *sk) +{ + read_lock(&sk->sk_callback_lock); + + if (sk->sk_sleep && waitqueue_active(sk->sk_sleep)) + wake_up_interruptible(sk->sk_sleep); + /* Should agree with poll, otherwise some programs break */ + if (sock_writeable(sk)) + sk_wake_async(sk, 2, POLL_OUT); + + read_unlock(&sk->sk_callback_lock); +} + /** * dccp_wait_for_ccid - Wait for ccid to tell us we can send a packet * @sk: socket to wait for -- cgit v1.2.3