lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150128.150042.1853211263331246216.davem@davemloft.net>
Date:	Wed, 28 Jan 2015 15:00:42 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	ncardwell@...gle.com
Cc:	netdev@...r.kernel.org, ycheng@...gle.com, edumazet@...gle.com
Subject: Re: [PATCH net-next 1/5] tcp: stretch ACK fixes prep

From: Neal Cardwell <ncardwell@...gle.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.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ