From: David Miller <davem@davemloft.net>
To: ncardwell@google.com
Cc: netdev@vger.kernel.org, ycheng@google.com, edumazet@google.com
Subject: Re: [PATCH net-next 1/5] tcp: stretch ACK fixes prep
Date: Wed, 28 Jan 2015 15:00:42 -0800 (PST) [thread overview]
Message-ID: <20150128.150042.1853211263331246216.davem@davemloft.net> (raw)
In-Reply-To: <1422390883-15603-2-git-send-email-ncardwell@google.com>
From: Neal Cardwell <ncardwell@google.com>
Date: Tue, 27 Jan 2015 15:34:39 -0500
> -void tcp_slow_start(struct tcp_sock *tp, u32 acked);
...
> +int tcp_slow_start(struct tcp_sock *tp, u32 acked);
...
...
> @@ -360,25 +360,28 @@ int tcp_set_congestion_control(struct sock *sk, const char *name)
> * ABC caps N to 2. Slow start exits when cwnd grows over ssthresh and
> * returns the leftover acks to adjust cwnd in congestion avoidance mode.
> */
> -void tcp_slow_start(struct tcp_sock *tp, u32 acked)
> +int tcp_slow_start(struct tcp_sock *tp, u32 acked)
> {
> u32 cwnd = tp->snd_cwnd + acked;
>
> if (cwnd > tp->snd_ssthresh)
> cwnd = tp->snd_ssthresh + 1;
> + acked -= cwnd - tp->snd_cwnd;
> tp->snd_cwnd = min(cwnd, tp->snd_cwnd_clamp);
> +
> + return acked;
> }
'acked' is a u32, please have this function return a u32 as well.
In fact in all the call sites the return value gets assigned into a
local u32 variable as well, so I have no idea why you're using 'int'
here.
Thanks.
next prev parent reply other threads:[~2015-01-29 1:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-27 20:34 [PATCH net-next 0/5] fix stretch ACK bugs in TCP CUBIC and Reno Neal Cardwell
2015-01-27 20:34 ` [PATCH net-next 1/5] tcp: stretch ACK fixes prep Neal Cardwell
2015-01-28 23:00 ` David Miller [this message]
2015-01-27 20:34 ` [PATCH net-next 2/5] tcp: fix the timid additive increase on stretch ACKs Neal Cardwell
2015-01-27 20:34 ` [PATCH net-next 3/5] tcp: fix stretch ACK bugs in Reno Neal Cardwell
2015-01-27 20:34 ` [PATCH net-next 4/5] tcp: fix stretch ACK bugs in CUBIC Neal Cardwell
2015-01-27 20:34 ` [PATCH net-next 5/5] tcp: fix timing issue in CUBIC slope calculation Neal Cardwell
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=20150128.150042.1853211263331246216.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--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).