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] [thread-next>] [day] [month] [year] [list]
Message-Id: <475C1718-ADEE-4839-AC8C-77E3C1353DF4@kau.se>
Date:	Thu, 10 Dec 2015 07:51:46 +0100
From:	Per Hurtig <per.hurtig@....se>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	David Miller <davem@...emloft.net>, edumazet@...gle.com,
	ncardwell@...gle.com, nanditad@...gle.com, tom@...bertland.com,
	Yuchung Cheng <ycheng@...gle.com>, viro@...iv.linux.org.uk,
	fw@...len.de, mleitner@...hat.com, daniel@...earbox.net,
	willemb@...gle.com, ilpo.jarvinen@...sinki.fi,
	pasi.sarolahti@....fi, stephen@...workplumber.org,
	netdev@...r.kernel.org,
	Anna Brunström <anna.brunstrom@....se>,
	apetlund@...ula.no, Michael Welzl <michawe@....uio.no>,
	Mohammad Rajiullah <mohammad.rajiullah@....se>
Subject: Re: [RFC PATCHv2 net-next 1/2] tcp: RTO Restart (RTOR)


> On 08 Dec 2015, at 14:47, Eric Dumazet <eric.dumazet@...il.com> wrote:
> 
> On Tue, 2015-12-08 at 10:19 +0100, Per Hurtig wrote:
> 
>> +static u32 tcp_unsent_pkts(const struct sock *sk, u32 ulimit)
>> +{
>> +	struct sk_buff *skb = tcp_send_head(sk);
>> +	u32 pkts = 0;
>> +
>> +	if (skb)
>> +		tcp_for_write_queue_from(skb, sk) {
>> +			pkts += tcp_skb_pcount(skb);
>> +
>> +			if (ulimit && pkts >= ulimit)
>> +				return ulimit;
>> +		}
>> +
>> +	return pkts;
>> +}
> 
> 
> Considering Yuchung feedback, have you looked at using an approximation
> instead ?
> 
> (ie using tp->write_seq - tp->snd_nxt)
> 
> 

Well, an approximation is rather “dangerous” as missing a single packet
could inhibit the desired behaviour. If looping is undesired, I think a
better solution is to actually *not* do this check at all and instead rely
solely on the

tp->packets_out < TCP_RTORESTART_THRESH

check instead. The reason why the number of unsent packets was
included was only to fix a corner case where it should be possible
to use the modified restart, but impossible due to the conditioning.

However, this corner case is likely to not occur very often and we
may be better off with the simpler check.

The corner case (if I remember this correctly) is that the restart is
not triggered when you have 2 segments in flight and (i) have a
congestion window of exactly 3; or (ii) get a packet written to the socket
just between previous data transmission and the arrival of the
acknowledgment that triggers the restart.


— Per


Download attachment "signature.asc" of type "application/pgp-signature" (456 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ