[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>

authored by

Arnaldo Carvalho de Melo and committed by
David S. Miller
c530cfb1 a84ffe43

+20
+5
net/dccp/ccids/ccid3.c
··· 556 556 /* remove all packets older than the one acked from history */ 557 557 dccp_tx_hist_purge_older(ccid3_tx_hist, 558 558 &hctx->ccid3hctx_hist, packet); 559 + /* 560 + * As we have calculated new ipi, delta, t_nom it is possible that 561 + * we now can send a packet, so wake up dccp_wait_for_ccids. 562 + */ 563 + sk->sk_write_space(sk); 559 564 560 565 /* 561 566 * Schedule no feedback timer to expire in
+1
net/dccp/dccp.h
··· 127 127 const enum dccp_pkt_type pkt_type); 128 128 129 129 extern int dccp_write_xmit(struct sock *sk, struct sk_buff *skb, long *timeo); 130 + extern void dccp_write_space(struct sock *sk); 130 131 131 132 extern void dccp_init_xmit_timers(struct sock *sk); 132 133 static inline void dccp_clear_xmit_timers(struct sock *sk)
+1
net/dccp/ipv4.c
··· 1280 1280 dccp_init_xmit_timers(sk); 1281 1281 inet_csk(sk)->icsk_rto = DCCP_TIMEOUT_INIT; 1282 1282 sk->sk_state = DCCP_CLOSED; 1283 + sk->sk_write_space = dccp_write_space; 1283 1284 dp->dccps_mss_cache = 536; 1284 1285 dp->dccps_role = DCCP_ROLE_UNDEFINED; 1285 1286
+13
net/dccp/output.c
··· 150 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 167 * dccp_wait_for_ccid - Wait for ccid to tell us we can send a packet 155 168 * @sk: socket to wait for