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]
Date:   Wed, 26 Jul 2017 17:35:31 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Mao Wenan <maowenan@...wei.com>
Cc:     kbuild-all@...org, netdev@...r.kernel.org, davem@...emloft.net,
        weiyongjun1@...wei.com, chenweilong@...wei.com
Subject: Re: [PATCH net-next] TLP: Don't reschedule PTO when there's one
 outstanding TLP retransmission.

Hi Mao,

[auto build test WARNING on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Mao-Wenan/TLP-Don-t-reschedule-PTO-when-there-s-one-outstanding-TLP-retransmission/20170726-172222
config: x86_64-randconfig-x000-201730 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   net//ipv4/tcp_output.c: In function 'tcp_schedule_loss_probe':
>> net//ipv4/tcp_output.c:2430:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
      s32 delta = rto_time_stamp - tcp_jiffies32;
      ^~~

vim +2430 net//ipv4/tcp_output.c

6ba8a3b1 Nandita Dukkipati 2013-03-11  2374  
6ba8a3b1 Nandita Dukkipati 2013-03-11  2375  bool tcp_schedule_loss_probe(struct sock *sk)
6ba8a3b1 Nandita Dukkipati 2013-03-11  2376  {
6ba8a3b1 Nandita Dukkipati 2013-03-11  2377  	struct inet_connection_sock *icsk = inet_csk(sk);
6ba8a3b1 Nandita Dukkipati 2013-03-11  2378  	struct tcp_sock *tp = tcp_sk(sk);
6ba8a3b1 Nandita Dukkipati 2013-03-11  2379  	u32 timeout, tlp_time_stamp, rto_time_stamp;
6ba8a3b1 Nandita Dukkipati 2013-03-11  2380  
6ba8a3b1 Nandita Dukkipati 2013-03-11  2381  	/* No consecutive loss probes. */
6ba8a3b1 Nandita Dukkipati 2013-03-11  2382  	if (WARN_ON(icsk->icsk_pending == ICSK_TIME_LOSS_PROBE)) {
6ba8a3b1 Nandita Dukkipati 2013-03-11  2383  		tcp_rearm_rto(sk);
6ba8a3b1 Nandita Dukkipati 2013-03-11  2384  		return false;
6ba8a3b1 Nandita Dukkipati 2013-03-11  2385  	}
6ba8a3b1 Nandita Dukkipati 2013-03-11  2386  	/* Don't do any loss probe on a Fast Open connection before 3WHS
6ba8a3b1 Nandita Dukkipati 2013-03-11  2387  	 * finishes.
6ba8a3b1 Nandita Dukkipati 2013-03-11  2388  	 */
f9b99582 Yuchung Cheng     2015-09-18  2389  	if (tp->fastopen_rsk)
6ba8a3b1 Nandita Dukkipati 2013-03-11  2390  		return false;
6ba8a3b1 Nandita Dukkipati 2013-03-11  2391  
6ba8a3b1 Nandita Dukkipati 2013-03-11  2392  	/* TLP is only scheduled when next timer event is RTO. */
6ba8a3b1 Nandita Dukkipati 2013-03-11  2393  	if (icsk->icsk_pending != ICSK_TIME_RETRANS)
6ba8a3b1 Nandita Dukkipati 2013-03-11  2394  		return false;
6ba8a3b1 Nandita Dukkipati 2013-03-11  2395  
6ba8a3b1 Nandita Dukkipati 2013-03-11  2396  	/* Schedule a loss probe in 2*RTT for SACK capable connections
6ba8a3b1 Nandita Dukkipati 2013-03-11  2397  	 * in Open state, that are either limited by cwnd or application.
6ba8a3b1 Nandita Dukkipati 2013-03-11  2398  	 */
bec41a11 Yuchung Cheng     2017-01-12  2399  	if ((sysctl_tcp_early_retrans != 3 && sysctl_tcp_early_retrans != 4) ||
bec41a11 Yuchung Cheng     2017-01-12  2400  	    !tp->packets_out || !tcp_is_sack(tp) ||
bec41a11 Yuchung Cheng     2017-01-12  2401  	    icsk->icsk_ca_state != TCP_CA_Open)
6ba8a3b1 Nandita Dukkipati 2013-03-11  2402  		return false;
6ba8a3b1 Nandita Dukkipati 2013-03-11  2403  
6ba8a3b1 Nandita Dukkipati 2013-03-11  2404  	if ((tp->snd_cwnd > tcp_packets_in_flight(tp)) &&
6ba8a3b1 Nandita Dukkipati 2013-03-11  2405  	     tcp_send_head(sk))
6ba8a3b1 Nandita Dukkipati 2013-03-11  2406  		return false;
6ba8a3b1 Nandita Dukkipati 2013-03-11  2407  
bb4d991a Yuchung Cheng     2017-07-19  2408  	/* Probe timeout is 2*rtt. Add minimum RTO to account
f9b99582 Yuchung Cheng     2015-09-18  2409  	 * for delayed ack when there's one outstanding packet. If no RTT
f9b99582 Yuchung Cheng     2015-09-18  2410  	 * sample is available then probe after TCP_TIMEOUT_INIT.
6ba8a3b1 Nandita Dukkipati 2013-03-11  2411  	 */
bb4d991a Yuchung Cheng     2017-07-19  2412  	if (tp->srtt_us) {
bb4d991a Yuchung Cheng     2017-07-19  2413  		timeout = usecs_to_jiffies(tp->srtt_us >> 2);
6ba8a3b1 Nandita Dukkipati 2013-03-11  2414  		if (tp->packets_out == 1)
bb4d991a Yuchung Cheng     2017-07-19  2415  			timeout += TCP_RTO_MIN;
bb4d991a Yuchung Cheng     2017-07-19  2416  		else
bb4d991a Yuchung Cheng     2017-07-19  2417  			timeout += TCP_TIMEOUT_MIN;
bb4d991a Yuchung Cheng     2017-07-19  2418  	} else {
bb4d991a Yuchung Cheng     2017-07-19  2419  		timeout = TCP_TIMEOUT_INIT;
bb4d991a Yuchung Cheng     2017-07-19  2420  	}
6ba8a3b1 Nandita Dukkipati 2013-03-11  2421  
6ba8a3b1 Nandita Dukkipati 2013-03-11  2422  	/* If RTO is shorter, just schedule TLP in its place. */
ac9517fc Eric Dumazet      2017-05-16  2423  	tlp_time_stamp = tcp_jiffies32 + timeout;
6ba8a3b1 Nandita Dukkipati 2013-03-11  2424  	rto_time_stamp = (u32)inet_csk(sk)->icsk_timeout;
6ba8a3b1 Nandita Dukkipati 2013-03-11  2425  	if ((s32)(tlp_time_stamp - rto_time_stamp) > 0) {
e41572cd Mao Wenan         2017-07-25  2426  		/*It is no need to reschedule PTO when there is one outstanding TLP retransmission*/
e41572cd Mao Wenan         2017-07-25  2427  		if (tp->tlp_high_seq) {
e41572cd Mao Wenan         2017-07-25  2428  			return false;
e41572cd Mao Wenan         2017-07-25  2429  		}
ac9517fc Eric Dumazet      2017-05-16 @2430  		s32 delta = rto_time_stamp - tcp_jiffies32;
6ba8a3b1 Nandita Dukkipati 2013-03-11  2431  		if (delta > 0)
6ba8a3b1 Nandita Dukkipati 2013-03-11  2432  			timeout = delta;
6ba8a3b1 Nandita Dukkipati 2013-03-11  2433  	}
6ba8a3b1 Nandita Dukkipati 2013-03-11  2434  
6ba8a3b1 Nandita Dukkipati 2013-03-11  2435  	inet_csk_reset_xmit_timer(sk, ICSK_TIME_LOSS_PROBE, timeout,
6ba8a3b1 Nandita Dukkipati 2013-03-11  2436  				  TCP_RTO_MAX);
6ba8a3b1 Nandita Dukkipati 2013-03-11  2437  	return true;
6ba8a3b1 Nandita Dukkipati 2013-03-11  2438  }
6ba8a3b1 Nandita Dukkipati 2013-03-11  2439  

:::::: The code at line 2430 was first introduced by commit
:::::: ac9517fcf310327fa3e3b0d8366e4b11236b1b4b tcp: replace misc tcp_time_stamp to tcp_jiffies32

:::::: TO: Eric Dumazet <edumazet@...gle.com>
:::::: CC: David S. Miller <davem@...emloft.net>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (27789 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ