[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201806271210.krNIoM3V%fengguang.wu@intel.com>
Date: Wed, 27 Jun 2018 12:22:53 +0800
From: kbuild test robot <lkp@...el.com>
To: Lawrence Brakmo <brakmo@...com>
Cc: kbuild-all@...org, netdev <netdev@...r.kernel.org>,
Kernel Team <kernel-team@...com>,
Blake Matheny <bmatheny@...com>,
Alexei Starovoitov <ast@...com>,
Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [PATCH net-next] tcp: force cwnd at least 2 in tcp_cwnd_reduction
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
Powered by blists - more mailing lists