netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Martin KaFai Lau <kafai@fb.com>
Cc: kbuild-all@lists.01.org, bpf@vger.kernel.org,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	David Miller <davem@davemloft.net>,
	kernel-team@fb.com, netdev@vger.kernel.org
Subject: Re: [PATCH bpf-next v2 07/11] bpf: tcp: Support tcp_congestion_ops in bpf
Date: Tue, 24 Dec 2019 15:16:20 +0800	[thread overview]
Message-ID: <201912241525.XySoMk64%lkp@intel.com> (raw)
In-Reply-To: <20191221062611.1183363-1-kafai@fb.com>

[-- Attachment #1: Type: text/plain, Size: 8202 bytes --]

Hi Martin,

I love your patch! Perhaps something to improve:

[auto build test WARNING on bpf-next/master]
[cannot apply to bpf/master net/master v5.5-rc3 next-20191220]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Martin-KaFai-Lau/Introduce-BPF-STRUCT_OPS/20191224-085617
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: s390-debug_defconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=s390 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   kernel/bpf/bpf_struct_ops.c: In function 'bpf_struct_ops_init':
>> kernel/bpf/bpf_struct_ops.c:198:1: warning: the frame size of 1208 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    }
    ^

vim +198 kernel/bpf/bpf_struct_ops.c

d69ac27055a81d Martin KaFai Lau 2019-12-20  113  
d69ac27055a81d Martin KaFai Lau 2019-12-20  114  	module_id = btf_find_by_name_kind(_btf_vmlinux, "module",
d69ac27055a81d Martin KaFai Lau 2019-12-20  115  					  BTF_KIND_STRUCT);
d69ac27055a81d Martin KaFai Lau 2019-12-20  116  	if (module_id < 0) {
d69ac27055a81d Martin KaFai Lau 2019-12-20  117  		pr_warn("Cannot find struct module in btf_vmlinux\n");
d69ac27055a81d Martin KaFai Lau 2019-12-20  118  		return;
d69ac27055a81d Martin KaFai Lau 2019-12-20  119  	}
d69ac27055a81d Martin KaFai Lau 2019-12-20  120  	module_type = btf_type_by_id(_btf_vmlinux, module_id);
d69ac27055a81d Martin KaFai Lau 2019-12-20  121  
b14e6918483a61 Martin KaFai Lau 2019-12-20  122  	for (i = 0; i < ARRAY_SIZE(bpf_struct_ops); i++) {
b14e6918483a61 Martin KaFai Lau 2019-12-20  123  		st_ops = bpf_struct_ops[i];
b14e6918483a61 Martin KaFai Lau 2019-12-20  124  
d69ac27055a81d Martin KaFai Lau 2019-12-20  125  		if (strlen(st_ops->name) + VALUE_PREFIX_LEN >=
d69ac27055a81d Martin KaFai Lau 2019-12-20  126  		    sizeof(value_name)) {
d69ac27055a81d Martin KaFai Lau 2019-12-20  127  			pr_warn("struct_ops name %s is too long\n",
d69ac27055a81d Martin KaFai Lau 2019-12-20  128  				st_ops->name);
d69ac27055a81d Martin KaFai Lau 2019-12-20  129  			continue;
d69ac27055a81d Martin KaFai Lau 2019-12-20  130  		}
d69ac27055a81d Martin KaFai Lau 2019-12-20  131  		sprintf(value_name, "%s%s", VALUE_PREFIX, st_ops->name);
d69ac27055a81d Martin KaFai Lau 2019-12-20  132  
d69ac27055a81d Martin KaFai Lau 2019-12-20  133  		value_id = btf_find_by_name_kind(_btf_vmlinux, value_name,
d69ac27055a81d Martin KaFai Lau 2019-12-20  134  						 BTF_KIND_STRUCT);
d69ac27055a81d Martin KaFai Lau 2019-12-20  135  		if (value_id < 0) {
d69ac27055a81d Martin KaFai Lau 2019-12-20  136  			pr_warn("Cannot find struct %s in btf_vmlinux\n",
d69ac27055a81d Martin KaFai Lau 2019-12-20  137  				value_name);
d69ac27055a81d Martin KaFai Lau 2019-12-20  138  			continue;
d69ac27055a81d Martin KaFai Lau 2019-12-20  139  		}
d69ac27055a81d Martin KaFai Lau 2019-12-20  140  
b14e6918483a61 Martin KaFai Lau 2019-12-20  141  		type_id = btf_find_by_name_kind(_btf_vmlinux, st_ops->name,
b14e6918483a61 Martin KaFai Lau 2019-12-20  142  						BTF_KIND_STRUCT);
b14e6918483a61 Martin KaFai Lau 2019-12-20  143  		if (type_id < 0) {
b14e6918483a61 Martin KaFai Lau 2019-12-20  144  			pr_warn("Cannot find struct %s in btf_vmlinux\n",
b14e6918483a61 Martin KaFai Lau 2019-12-20  145  				st_ops->name);
b14e6918483a61 Martin KaFai Lau 2019-12-20  146  			continue;
b14e6918483a61 Martin KaFai Lau 2019-12-20  147  		}
b14e6918483a61 Martin KaFai Lau 2019-12-20  148  		t = btf_type_by_id(_btf_vmlinux, type_id);
b14e6918483a61 Martin KaFai Lau 2019-12-20  149  		if (btf_type_vlen(t) > BPF_STRUCT_OPS_MAX_NR_MEMBERS) {
b14e6918483a61 Martin KaFai Lau 2019-12-20  150  			pr_warn("Cannot support #%u members in struct %s\n",
b14e6918483a61 Martin KaFai Lau 2019-12-20  151  				btf_type_vlen(t), st_ops->name);
b14e6918483a61 Martin KaFai Lau 2019-12-20  152  			continue;
b14e6918483a61 Martin KaFai Lau 2019-12-20  153  		}
b14e6918483a61 Martin KaFai Lau 2019-12-20  154  
b14e6918483a61 Martin KaFai Lau 2019-12-20  155  		for_each_member(j, t, member) {
b14e6918483a61 Martin KaFai Lau 2019-12-20  156  			const struct btf_type *func_proto;
b14e6918483a61 Martin KaFai Lau 2019-12-20  157  
b14e6918483a61 Martin KaFai Lau 2019-12-20  158  			mname = btf_name_by_offset(_btf_vmlinux,
b14e6918483a61 Martin KaFai Lau 2019-12-20  159  						   member->name_off);
b14e6918483a61 Martin KaFai Lau 2019-12-20  160  			if (!*mname) {
b14e6918483a61 Martin KaFai Lau 2019-12-20  161  				pr_warn("anon member in struct %s is not supported\n",
b14e6918483a61 Martin KaFai Lau 2019-12-20  162  					st_ops->name);
b14e6918483a61 Martin KaFai Lau 2019-12-20  163  				break;
b14e6918483a61 Martin KaFai Lau 2019-12-20  164  			}
b14e6918483a61 Martin KaFai Lau 2019-12-20  165  
b14e6918483a61 Martin KaFai Lau 2019-12-20  166  			if (btf_member_bitfield_size(t, member)) {
b14e6918483a61 Martin KaFai Lau 2019-12-20  167  				pr_warn("bit field member %s in struct %s is not supported\n",
b14e6918483a61 Martin KaFai Lau 2019-12-20  168  					mname, st_ops->name);
b14e6918483a61 Martin KaFai Lau 2019-12-20  169  				break;
b14e6918483a61 Martin KaFai Lau 2019-12-20  170  			}
b14e6918483a61 Martin KaFai Lau 2019-12-20  171  
b14e6918483a61 Martin KaFai Lau 2019-12-20  172  			func_proto = btf_type_resolve_func_ptr(_btf_vmlinux,
b14e6918483a61 Martin KaFai Lau 2019-12-20  173  							       member->type,
b14e6918483a61 Martin KaFai Lau 2019-12-20  174  							       NULL);
b14e6918483a61 Martin KaFai Lau 2019-12-20  175  			if (func_proto &&
b14e6918483a61 Martin KaFai Lau 2019-12-20  176  			    btf_distill_func_proto(&log, _btf_vmlinux,
b14e6918483a61 Martin KaFai Lau 2019-12-20  177  						   func_proto, mname,
b14e6918483a61 Martin KaFai Lau 2019-12-20  178  						   &st_ops->func_models[j])) {
b14e6918483a61 Martin KaFai Lau 2019-12-20  179  				pr_warn("Error in parsing func ptr %s in struct %s\n",
b14e6918483a61 Martin KaFai Lau 2019-12-20  180  					mname, st_ops->name);
b14e6918483a61 Martin KaFai Lau 2019-12-20  181  				break;
b14e6918483a61 Martin KaFai Lau 2019-12-20  182  			}
b14e6918483a61 Martin KaFai Lau 2019-12-20  183  		}
b14e6918483a61 Martin KaFai Lau 2019-12-20  184  
b14e6918483a61 Martin KaFai Lau 2019-12-20  185  		if (j == btf_type_vlen(t)) {
b14e6918483a61 Martin KaFai Lau 2019-12-20  186  			if (st_ops->init(_btf_vmlinux)) {
b14e6918483a61 Martin KaFai Lau 2019-12-20  187  				pr_warn("Error in init bpf_struct_ops %s\n",
b14e6918483a61 Martin KaFai Lau 2019-12-20  188  					st_ops->name);
b14e6918483a61 Martin KaFai Lau 2019-12-20  189  			} else {
b14e6918483a61 Martin KaFai Lau 2019-12-20  190  				st_ops->type_id = type_id;
b14e6918483a61 Martin KaFai Lau 2019-12-20  191  				st_ops->type = t;
d69ac27055a81d Martin KaFai Lau 2019-12-20  192  				st_ops->value_id = value_id;
d69ac27055a81d Martin KaFai Lau 2019-12-20  193  				st_ops->value_type =
d69ac27055a81d Martin KaFai Lau 2019-12-20  194  					btf_type_by_id(_btf_vmlinux, value_id);
b14e6918483a61 Martin KaFai Lau 2019-12-20  195  			}
b14e6918483a61 Martin KaFai Lau 2019-12-20  196  		}
b14e6918483a61 Martin KaFai Lau 2019-12-20  197  	}
b14e6918483a61 Martin KaFai Lau 2019-12-20 @198  }
b14e6918483a61 Martin KaFai Lau 2019-12-20  199  

:::::: The code at line 198 was first introduced by commit
:::::: b14e6918483a61bb02672580bde0aa60f4cce17d bpf: Introduce BPF_PROG_TYPE_STRUCT_OPS

:::::: TO: Martin KaFai Lau <kafai@fb.com>
:::::: CC: 0day robot <lkp@intel.com>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 19208 bytes --]

  parent reply	other threads:[~2019-12-24  7:17 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-21  6:25 [PATCH bpf-next v2 00/11] Introduce BPF STRUCT_OPS Martin KaFai Lau
2019-12-21  6:25 ` [PATCH bpf-next v2 01/11] bpf: Save PTR_TO_BTF_ID register state when spilling to stack Martin KaFai Lau
2019-12-21  6:25 ` [PATCH bpf-next v2 02/11] bpf: Avoid storing modifier to info->btf_id Martin KaFai Lau
2019-12-21  6:26 ` [PATCH bpf-next v2 03/11] bpf: Add enum support to btf_ctx_access() Martin KaFai Lau
2019-12-21  6:26 ` [PATCH bpf-next v2 04/11] bpf: Support bitfield read access in btf_struct_access Martin KaFai Lau
2019-12-23  7:49   ` Yonghong Song
2019-12-23 20:05   ` Andrii Nakryiko
2019-12-23 21:21     ` Yonghong Song
2019-12-21  6:26 ` [PATCH bpf-next v2 05/11] bpf: Introduce BPF_PROG_TYPE_STRUCT_OPS Martin KaFai Lau
2019-12-23 19:33   ` Yonghong Song
2019-12-23 20:29   ` Andrii Nakryiko
2019-12-23 22:29     ` Martin Lau
2019-12-23 22:55       ` Andrii Nakryiko
2019-12-24 11:46   ` kbuild test robot
2019-12-21  6:26 ` [PATCH bpf-next v2 06/11] bpf: Introduce BPF_MAP_TYPE_STRUCT_OPS Martin KaFai Lau
2019-12-23 19:57   ` Yonghong Song
2019-12-23 21:44     ` Andrii Nakryiko
2019-12-23 22:15       ` Martin Lau
2019-12-27  6:16     ` Martin Lau
2019-12-23 23:05   ` Andrii Nakryiko
2019-12-28  1:47     ` Martin Lau
2019-12-28  2:24       ` Andrii Nakryiko
2019-12-28  5:16         ` Martin Lau
2019-12-24 12:28   ` kbuild test robot
2019-12-21  6:26 ` [PATCH bpf-next v2 07/11] bpf: tcp: Support tcp_congestion_ops in bpf Martin KaFai Lau
2019-12-23 20:18   ` Yonghong Song
2019-12-23 23:20   ` Andrii Nakryiko
2019-12-24  7:16   ` kbuild test robot [this message]
2019-12-24 13:06   ` kbuild test robot
2019-12-21  6:26 ` [PATCH bpf-next v2 08/11] bpf: Add BPF_FUNC_tcp_send_ack helper Martin KaFai Lau
2019-12-21  6:26 ` [PATCH bpf-next v2 09/11] bpf: Synch uapi bpf.h to tools/ Martin KaFai Lau
2019-12-21  6:26 ` [PATCH bpf-next v2 10/11] bpf: libbpf: Add STRUCT_OPS support Martin KaFai Lau
2019-12-23 19:54   ` Andrii Nakryiko
2019-12-26 22:47     ` Martin Lau
2019-12-21  6:26 ` [PATCH bpf-next v2 11/11] bpf: Add bpf_dctcp example Martin KaFai Lau
2019-12-23 23:26   ` Andrii Nakryiko
2019-12-24  1:31     ` Martin Lau
2019-12-24  7:01       ` Andrii Nakryiko
2019-12-24  7:32         ` Martin Lau
2019-12-24 16:50         ` Martin Lau
2019-12-26 19:02           ` Andrii Nakryiko
2019-12-26 20:25             ` Martin Lau
2019-12-26 20:48               ` Andrii Nakryiko
2019-12-26 22:20                 ` Martin Lau
2019-12-26 22:25                   ` Andrii Nakryiko

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=201912241525.XySoMk64%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kafai@fb.com \
    --cc=kbuild-all@lists.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;
as well as URLs for NNTP newsgroup(s).