From 2c67d87c2001e9acb5f8d83e9446319c9853bbd4 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Mon, 29 Aug 2005 02:15:54 -0300 Subject: [PATCH] --- yaml --- r: 6445 b: refs/heads/master c: c530cfb1ce1e8f230744c3f3bd86771f50725053 h: refs/heads/master i: 6443: 512af2936f118196d9efd6ea65dae32badca524c v: v3 --- [refs] | 2 +- trunk/net/dccp/ccids/ccid3.c | 5 +++++ trunk/net/dccp/dccp.h | 1 + trunk/net/dccp/ipv4.c | 1 + trunk/net/dccp/output.c | 13 +++++++++++++ 5 files changed, 21 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index ec5906fd5c72..8f6d5d240786 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a84ffe430342db6ee585a5038f3242a6b4112d69 +refs/heads/master: c530cfb1ce1e8f230744c3f3bd86771f50725053 diff --git a/trunk/net/dccp/ccids/ccid3.c b/trunk/net/dccp/ccids/ccid3.c index e22b0eefdbf9..7bf3b3a91e97 100644 --- a/trunk/net/dccp/ccids/ccid3.c +++ b/trunk/net/dccp/ccids/ccid3.c @@ -556,6 +556,11 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) /* remove all packets older than the one acked from history */ dccp_tx_hist_purge_older(ccid3_tx_hist, &hctx->ccid3hctx_hist, packet); + /* + * As we have calculated new ipi, delta, t_nom it is possible that + * we now can send a packet, so wake up dccp_wait_for_ccids. + */ + sk->sk_write_space(sk); /* * Schedule no feedback timer to expire in diff --git a/trunk/net/dccp/dccp.h b/trunk/net/dccp/dccp.h index 5cd9e794bbe2..33456c0d5937 100644 --- a/trunk/net/dccp/dccp.h +++ b/trunk/net/dccp/dccp.h @@ -127,6 +127,7 @@ extern void dccp_send_sync(struct sock *sk, const u64 seq, const enum dccp_pkt_type pkt_type); extern int dccp_write_xmit(struct sock *sk, struct sk_buff *skb, long *timeo); +extern void dccp_write_space(struct sock *sk); extern void dccp_init_xmit_timers(struct sock *sk); static inline void dccp_clear_xmit_timers(struct sock *sk) diff --git a/trunk/net/dccp/ipv4.c b/trunk/net/dccp/ipv4.c index 3cf2cbcdcafd..3fc75dbee4b8 100644 --- a/trunk/net/dccp/ipv4.c +++ b/trunk/net/dccp/ipv4.c @@ -1280,6 +1280,7 @@ static int dccp_v4_init_sock(struct sock *sk) dccp_init_xmit_timers(sk); inet_csk(sk)->icsk_rto = DCCP_TIMEOUT_INIT; sk->sk_state = DCCP_CLOSED; + sk->sk_write_space = dccp_write_space; dp->dccps_mss_cache = 536; dp->dccps_role = DCCP_ROLE_UNDEFINED; diff --git a/trunk/net/dccp/output.c b/trunk/net/dccp/output.c index 116f6db5678d..28de157a4326 100644 --- a/trunk/net/dccp/output.c +++ b/trunk/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