netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: nanditad@google.com
Cc: netdev@vger.kernel.org, therbert@google.com,
	mattmathis@google.com, ycheng@google.com
Subject: Re: [PATCH v2] Proportional Rate Reduction for TCP.
Date: Fri, 19 Aug 2011 03:26:51 -0700 (PDT)	[thread overview]
Message-ID: <20110819.032651.405436165608502880.davem@davemloft.net> (raw)
In-Reply-To: <1313739212-2315-1-git-send-email-nanditad@google.com>

From: Nandita Dukkipati <nanditad@google.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.

> +		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.



  parent reply	other threads:[~2011-08-19 10:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12  7:29 [PATCH] Proportional Rate Reduction for TCP Nandita Dukkipati
2011-08-12 11:36 ` Ilpo Järvinen
2011-08-19  7:34   ` Nandita Dukkipati
2011-08-14  5:05 ` Andi Kleen
2011-08-19  7:34   ` Nandita Dukkipati
2011-08-19  7:33 ` [PATCH v2] " Nandita Dukkipati
2011-08-19 10:25   ` Ilpo Järvinen
2011-08-20  1:28     ` Nandita Dukkipati
2011-08-20 12:41       ` Ilpo Järvinen
2011-08-22  6:21         ` Nandita Dukkipati
2011-08-19 10:26   ` David Miller [this message]
2011-08-20  1:29     ` Nandita Dukkipati
2011-08-20  1:29   ` [PATCH v3] " Nandita Dukkipati
2011-08-22  6:21     ` [PATCH v4] " Nandita Dukkipati
2011-08-25  2:43       ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110819.032651.405436165608502880.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=mattmathis@google.com \
    --cc=nanditad@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=therbert@google.com \
    --cc=ycheng@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).