From: kbuild test robot <lkp@intel.com>
To: Lawrence Brakmo <brakmo@fb.com>
Cc: kbuild-all@01.org, netdev <netdev@vger.kernel.org>,
Kernel Team <kernel-team@fb.com>, Blake Matheny <bmatheny@fb.com>,
Alexei Starovoitov <ast@fb.com>,
Eric Dumazet <eric.dumazet@gmail.com>
Subject: Re: [PATCH net-next] tcp: force cwnd at least 2 in tcp_cwnd_reduction
Date: Wed, 27 Jun 2018 12:22:53 +0800 [thread overview]
Message-ID: <201806271210.krNIoM3V%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180627015222.3269067-1-brakmo@fb.com>
Hi Lawrence,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Lawrence-Brakmo/tcp-force-cwnd-at-least-2-in-tcp_cwnd_reduction/20180627-095533
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
net/ipv4/tcp_input.c:168:42: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:168:42: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:213:21: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:213:21: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:329:19: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:329:19: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:336:19: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:337:19: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:337:19: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:347:33: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:347:33: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:412:32: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:412:32: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:413:44: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:413:44: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:436:33: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:436:33: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:464:44: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:464:44: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:473:36: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:473:36: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:475:28: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:475:28: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:492:33: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:492:33: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:496:36: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:496:36: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:509:29: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:509:29: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:511:16: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:511:16: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:512:16: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:513:16: sparse: expression using sizeof(void)
include/net/tcp.h:739:16: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:652:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:652:26: sparse: expression using sizeof(void)
include/net/tcp.h:739:16: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:790:33: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:790:33: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:794:23: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:818:17: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:818:17: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:827:9: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:827:9: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:867:16: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:867:16: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:902:34: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:902:34: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:1654:25: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:1848:17: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:1849:17: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:1849:17: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:1869:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:1869:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:1896:34: sparse: expression using sizeof(void)
include/net/tcp.h:1138:24: sparse: expression using sizeof(void)
include/net/tcp.h:1138:24: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:1995:34: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:1995:34: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2024:39: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2024:39: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2400:44: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2472:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2472:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2472:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2472:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2472:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2472:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2472:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2472:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2472:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2472:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2472:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2472:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2472:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2472:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2476:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2476:26: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2479:18: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2479:18: sparse: expression using sizeof(void)
>> net/ipv4/tcp_input.c:2480:24: sparse: incompatible types in comparison expression (different signedness)
include/net/tcp.h:1138:24: sparse: expression using sizeof(void)
include/net/tcp.h:1138:24: sparse: expression using sizeof(void)
include/net/tcp.h:1138:24: sparse: expression using sizeof(void)
include/net/tcp.h:1138:24: sparse: expression using sizeof(void)
include/net/tcp.h:1138:24: sparse: expression using sizeof(void)
include/net/tcp.h:1138:24: sparse: expression using sizeof(void)
include/net/tcp.h:1138:24: sparse: expression using sizeof(void)
include/net/tcp.h:1138:24: sparse: expression using sizeof(void)
include/net/tcp.h:739:16: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:2990:48: sparse: expression using sizeof(void)
include/net/tcp.h:739:16: sparse: expression using sizeof(void)
include/net/tcp.h:739:16: sparse: expression using sizeof(void)
include/net/tcp.h:739:16: sparse: expression using sizeof(void)
include/net/tcp.h:739:16: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:3195:46: sparse: expression using sizeof(void)
net/ipv4/tcp_input.c:3195:46: sparse: expression using sizeof(void)
include/net/tcp.h:739:16: sparse: expression using sizeof(void)
include/net/tcp.h:1206:16: sparse: expression using sizeof(void)
include/net/tcp.h:1215:31: sparse: expression using sizeof(void)
include/net/tcp.h:1215:31: sparse: too many warnings
In file included from include/asm-generic/bug.h:18:0,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from net/ipv4/tcp_input.c:67:
net/ipv4/tcp_input.c: In function 'tcp_cwnd_reduction':
include/linux/kernel.h:812:29: warning: comparison of distinct pointer types lacks a cast
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
^
include/linux/kernel.h:826:4: note: in expansion of macro '__typecheck'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~
include/linux/kernel.h:836:24: note: in expansion of macro '__safe_cmp'
__builtin_choose_expr(__safe_cmp(x, y), 117- ^~~~~~~~~~
include/linux/kernel.h:852:19: note: in expansion of macro '__careful_cmp'
#define max(x, y) __careful_cmp(x, y, >)
^~~~~~~~~~~~~
net/ipv4/tcp_input.c:2480:17: note: in expansion of macro 'max'
tp->snd_cwnd = max(tcp_packets_in_flight(tp) + sndcnt, 2);
^~~
vim +2480 net/ipv4/tcp_input.c
2455
2456 void tcp_cwnd_reduction(struct sock *sk, int newly_acked_sacked, int flag)
2457 {
2458 struct tcp_sock *tp = tcp_sk(sk);
2459 int sndcnt = 0;
2460 int delta = tp->snd_ssthresh - tcp_packets_in_flight(tp);
2461
2462 if (newly_acked_sacked <= 0 || WARN_ON_ONCE(!tp->prior_cwnd))
2463 return;
2464
2465 tp->prr_delivered += newly_acked_sacked;
2466 if (delta < 0) {
2467 u64 dividend = (u64)tp->snd_ssthresh * tp->prr_delivered +
2468 tp->prior_cwnd - 1;
2469 sndcnt = div_u64(dividend, tp->prior_cwnd) - tp->prr_out;
2470 } else if ((flag & FLAG_RETRANS_DATA_ACKED) &&
2471 !(flag & FLAG_LOST_RETRANS)) {
> 2472 sndcnt = min_t(int, delta,
2473 max_t(int, tp->prr_delivered - tp->prr_out,
2474 newly_acked_sacked) + 1);
2475 } else {
2476 sndcnt = min(delta, newly_acked_sacked);
2477 }
2478 /* Force a fast retransmit upon entering fast recovery */
2479 sndcnt = max(sndcnt, (tp->prr_out ? 0 : 1));
> 2480 tp->snd_cwnd = max(tcp_packets_in_flight(tp) + sndcnt, 2);
2481 }
2482
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
prev parent reply other threads:[~2018-06-27 4:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-27 1:52 [PATCH net-next] tcp: force cwnd at least 2 in tcp_cwnd_reduction Lawrence Brakmo
2018-06-27 2:18 ` kbuild test robot
2018-06-27 4:22 ` 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=201806271210.krNIoM3V%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=ast@fb.com \
--cc=bmatheny@fb.com \
--cc=brakmo@fb.com \
--cc=eric.dumazet@gmail.com \
--cc=kbuild-all@01.org \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
/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