Re: [PATCH v2] Proportional Rate Reduction for TCP.
flat view
From: Nandita Dukkipati <hidden>
Date: 2011-08-20 01:29:19
On Fri, Aug 19, 2011 at 3:26 AM, David Miller [off-list ref] wrote:
From: Nandita Dukkipati <redacted> Date: Fri, 19 Aug 2011 00:33:32 -0700quoted
@@ -2830,9 +2830,14 @@ static int tcp_try_undo_loss(struct sock *sk)static inline void tcp_complete_cwr(struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); - /* Do not moderate cwnd if it's already undone in cwr or recovery */ - if (tp->undo_marker && tp->snd_cwnd > tp->snd_ssthresh) { - tp->snd_cwnd = tp->snd_ssthresh; + + /* Do not moderate cwnd if it's already undone in cwr or recovery. */ + if (tp->undo_marker) { + + if (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR)Please get rid of that empty line before the TCP_CA_CWR case.
Done.
quoted
+ sndcnt = DIV_ROUND_UP((u64)(tp->prr_delivered * + tp->snd_ssthresh), + (u64)tp->prior_cwnd) - tp->prr_out;This won't link on 32-bit unless __divdi3 libgcc routine is provided by the architecture. To portably do 64-bit division you need to use do_div() or something based upon it. Perhaps DIV_ROUND_UP_LL() will work best in this case.
patch v3 uses div_u64 which is based on do_div() for 32-bit archs. Thanks Nandita