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>,
Daniel Borkmann <daniel@iogearbox.net>,
Eric Dumazet <eric.dumazet@gmail.com>,
Neal Cardwell <ncardwell@google.com>,
Yuchung Cheng <ycheng@google.com>
Subject: Re: [PATCH v3 bpf-next 10/11] bpf: Add BPF_SOCK_OPS_STATE_CB
Date: Tue, 2 Jan 2018 12:01:13 +0800 [thread overview]
Message-ID: <201801021143.fXFICAxL%fengguang.wu@intel.com> (raw)
In-Reply-To: <20171231171030.2998769-11-brakmo@fb.com>
[-- Attachment #1: Type: text/plain, Size: 3449 bytes --]
Hi Lawrence,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
[also build test WARNING on next-20171222]
[cannot apply to bpf-next/master linus/master net/master v4.15-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Lawrence-Brakmo/bpf-More-sock_ops-callbacks/20180102-111550
config: x86_64-randconfig-x007-201800 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
In file included from arch/x86/include/asm/atomic.h:5:0,
from include/linux/atomic.h:5,
from include/linux/crypto.h:20,
from include/crypto/hash.h:16,
from net//ipv4/tcp.c:250:
net//ipv4/tcp.c: In function 'tcp_set_state':
>> net//ipv4/tcp.c:2041:34: warning: comparison between 'enum <anonymous>' and 'enum <anonymous>' [-Wenum-compare]
BUILD_BUG_ON(BPF_TCP_MAX_STATES != TCP_MAX_STATES);
^
include/linux/compiler.h:301:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:324:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:47:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:71:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
>> net//ipv4/tcp.c:2041:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(BPF_TCP_MAX_STATES != TCP_MAX_STATES);
^~~~~~~~~~~~
vim +/BUILD_BUG_ON +2041 net//ipv4/tcp.c
2036
2037 void tcp_set_state(struct sock *sk, int state)
2038 {
2039 int oldstate = sk->sk_state;
2040
> 2041 BUILD_BUG_ON(BPF_TCP_MAX_STATES != TCP_MAX_STATES);
2042 if (BPF_SOCK_OPS_TEST_FLAG(tcp_sk(sk), BPF_SOCK_OPS_STATE_CB_FLAG))
2043 tcp_call_bpf_2arg(sk, BPF_SOCK_OPS_STATE_CB, oldstate, state);
2044
2045 switch (state) {
2046 case TCP_ESTABLISHED:
2047 if (oldstate != TCP_ESTABLISHED)
2048 TCP_INC_STATS(sock_net(sk), TCP_MIB_CURRESTAB);
2049 break;
2050
2051 case TCP_CLOSE:
2052 if (oldstate == TCP_CLOSE_WAIT || oldstate == TCP_ESTABLISHED)
2053 TCP_INC_STATS(sock_net(sk), TCP_MIB_ESTABRESETS);
2054
2055 sk->sk_prot->unhash(sk);
2056 if (inet_csk(sk)->icsk_bind_hash &&
2057 !(sk->sk_userlocks & SOCK_BINDPORT_LOCK))
2058 inet_put_port(sk);
2059 /* fall through */
2060 default:
2061 if (oldstate == TCP_ESTABLISHED)
2062 TCP_DEC_STATS(sock_net(sk), TCP_MIB_CURRESTAB);
2063 }
2064
2065 /* Change state AFTER socket is unhashed to avoid closed
2066 * socket sitting in hash tables.
2067 */
2068 inet_sk_state_store(sk, state);
2069
---
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: 31602 bytes --]
next prev parent reply other threads:[~2018-01-02 4:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-31 17:10 [PATCH v3 bpf-next 00/11] bpf: More sock_ops callbacks Lawrence Brakmo
2017-12-31 17:10 ` [PATCH v3 bpf-next 01/11] bpf: Make SOCK_OPS_GET_TCP size independent Lawrence Brakmo
2017-12-31 17:10 ` [PATCH v3 bpf-next 02/11] bpf: Make SOCK_OPS_GET_TCP struct independent Lawrence Brakmo
2017-12-31 17:10 ` [PATCH v3 bpf-next 03/11] bpf: Add write access to tcp_sock and sock fields Lawrence Brakmo
2017-12-31 17:10 ` [PATCH v3 bpf-next 04/11] bpf: Support passing args to sock_ops bpf function Lawrence Brakmo
2017-12-31 17:10 ` [PATCH v3 bpf-next 05/11] bpf: Adds field bpf_sock_ops_flags to tcp_sock Lawrence Brakmo
2017-12-31 17:10 ` [PATCH v3 bpf-next 06/11] bpf: Add sock_ops RTO callback Lawrence Brakmo
2017-12-31 17:10 ` [PATCH v3 bpf-next 07/11] bpf: Add support for reading sk_state and more Lawrence Brakmo
2017-12-31 17:10 ` [PATCH v3 bpf-next 08/11] bpf: Add sock_ops R/W access to tclass & sk_txhash Lawrence Brakmo
2017-12-31 17:10 ` [PATCH v3 bpf-next 09/11] bpf: Add BPF_SOCK_OPS_RETRANS_CB Lawrence Brakmo
2017-12-31 17:10 ` [PATCH v3 bpf-next 10/11] bpf: Add BPF_SOCK_OPS_STATE_CB Lawrence Brakmo
2018-01-02 4:01 ` kbuild test robot [this message]
2018-01-03 8:21 ` Lawrence Brakmo
2017-12-31 17:10 ` [PATCH v3 bpf-next 11/11] bpf: add selftest for tcpbpf Lawrence Brakmo
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=201801021143.fXFICAxL%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=ast@fb.com \
--cc=bmatheny@fb.com \
--cc=brakmo@fb.com \
--cc=daniel@iogearbox.net \
--cc=eric.dumazet@gmail.com \
--cc=kbuild-all@01.org \
--cc=kernel-team@fb.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=ycheng@google.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;
as well as URLs for NNTP newsgroup(s).