[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAB_+Fg6YE0knqjNKfYHR5+kGezjVCz_J+zEXb=5pJi46fnRbmw@mail.gmail.com>
Date: Fri, 19 Aug 2011 18:29:15 -0700
From: Nandita Dukkipati <nanditad@...gle.com>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, therbert@...gle.com, mattmathis@...gle.com,
ycheng@...gle.com
Subject: Re: [PATCH v2] Proportional Rate Reduction for TCP.
On Fri, Aug 19, 2011 at 3:26 AM, David Miller <davem@...emloft.net> wrote:
> From: Nandita Dukkipati <nanditad@...gle.com>
> Date: Fri, 19 Aug 2011 00:33:32 -0700
>
>> @@ -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.
>
>> + 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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists