From: kbuild test robot <lkp@intel.com>
To: Mao Wenan <maowenan@huawei.com>
Cc: kbuild-all@01.org, netdev@vger.kernel.org, davem@davemloft.net,
weiyongjun1@huawei.com, chenweilong@huawei.com
Subject: Re: [PATCH net-next] TLP: Don't reschedule PTO when there's one outstanding TLP retransmission.
Date: Wed, 26 Jul 2017 17:35:31 +0800 [thread overview]
Message-ID: <201707261713.AhsB7NAF%fengguang.wu@intel.com> (raw)
In-Reply-To: <1500971735-21852-1-git-send-email-maowenan@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 5995 bytes --]
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@google.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27789 bytes --]
prev parent reply other threads:[~2017-07-26 9:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-25 8:35 [PATCH net-next] TLP: Don't reschedule PTO when there's one outstanding TLP retransmission Mao Wenan
2017-07-25 9:19 ` maowenan
2017-07-25 9:54 ` Sergei Shtylyov
2017-07-26 1:26 ` maowenan
2017-07-25 13:29 ` Neal Cardwell
2017-07-26 2:12 ` maowenan
2017-07-26 16:45 ` Yuchung Cheng
2017-07-27 1:28 ` maowenan
2017-07-28 22:57 ` Neal Cardwell
2017-07-26 9:35 ` kbuild test robot [this message]
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=201707261713.AhsB7NAF%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=chenweilong@huawei.com \
--cc=davem@davemloft.net \
--cc=kbuild-all@01.org \
--cc=maowenan@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=weiyongjun1@huawei.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