From: kernel test robot <lkp@intel.com>
To: Kumar Kartikeya Dwivedi <memxor@gmail.com>, bpf@vger.kernel.org
Cc: kbuild-all@lists.01.org, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
Maxim Mikityanskiy <maximmi@nvidia.com>,
Florian Westphal <fw@strlen.de>
Subject: Re: [PATCH bpf-next v3 7/9] net/netfilter: Add unstable CT lookup helpers for XDP and TC-BPF
Date: Fri, 10 Dec 2021 22:28:13 +0800 [thread overview]
Message-ID: <202112102230.6cj0WCoX-lkp@intel.com> (raw)
In-Reply-To: <20211210130230.4128676-8-memxor@gmail.com>
Hi Kumar,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Kumar-Kartikeya-Dwivedi/Introduce-unstable-CT-lookup-helpers/20211210-210439
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: arc-randconfig-r043-20211210 (https://download.01.org/0day-ci/archive/20211210/202112102230.6cj0WCoX-lkp@intel.com/config)
compiler: arc-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/683d78cc594f7867b8dae78b357ab82a5ee69484
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kumar-Kartikeya-Dwivedi/Introduce-unstable-CT-lookup-helpers/20211210-210439
git checkout 683d78cc594f7867b8dae78b357ab82a5ee69484
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash net/netfilter/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> net/netfilter/nf_conntrack_core.c:2566:17: warning: no previous prototype for 'bpf_xdp_ct_lookup' [-Wmissing-prototypes]
2566 | struct nf_conn *bpf_xdp_ct_lookup(struct xdp_md *xdp_ctx,
| ^~~~~~~~~~~~~~~~~
>> net/netfilter/nf_conntrack_core.c:2610:17: warning: no previous prototype for 'bpf_skb_ct_lookup' [-Wmissing-prototypes]
2610 | struct nf_conn *bpf_skb_ct_lookup(struct __sk_buff *skb_ctx,
| ^~~~~~~~~~~~~~~~~
>> net/netfilter/nf_conntrack_core.c:2648:6: warning: no previous prototype for 'bpf_ct_release' [-Wmissing-prototypes]
2648 | void bpf_ct_release(struct nf_conn *nfct)
| ^~~~~~~~~~~~~~
vim +/bpf_xdp_ct_lookup +2566 net/netfilter/nf_conntrack_core.c
2549
2550 /* bpf_xdp_ct_lookup - Lookup CT entry for the given tuple, and acquire a
2551 * reference to it
2552 *
2553 * Parameters:
2554 * @xdp_ctx - Pointer to ctx (xdp_md) in XDP program
2555 * Cannot be NULL
2556 * @bpf_tuple - Pointer to memory representing the tuple to look up
2557 * Cannot be NULL
2558 * @len__tuple - Length of the tuple structure
2559 * Must be one of sizeof(bpf_tuple->ipv4) or
2560 * sizeof(bpf_tuple->ipv6)
2561 * @opts - Additional options for lookup (documented above)
2562 * Cannot be NULL
2563 * @len__opts - Length of the bpf_ct_opts structure
2564 * Must be NF_BPF_CT_OPTS_SZ (12)
2565 */
> 2566 struct nf_conn *bpf_xdp_ct_lookup(struct xdp_md *xdp_ctx,
2567 struct bpf_sock_tuple *bpf_tuple,
2568 u32 len__tuple, struct bpf_ct_opts *opts,
2569 u32 len__opts)
2570 {
2571 struct xdp_buff *ctx = (struct xdp_buff *)xdp_ctx;
2572 struct net *caller_net;
2573 struct nf_conn *nfct;
2574
2575 BUILD_BUG_ON(sizeof(struct bpf_ct_opts) != NF_BPF_CT_OPTS_SZ);
2576
2577 if (!opts)
2578 return NULL;
2579 if (!bpf_tuple || opts->reserved[0] || opts->reserved[1] ||
2580 opts->reserved[2] || len__opts != NF_BPF_CT_OPTS_SZ) {
2581 opts->error = -EINVAL;
2582 return NULL;
2583 }
2584 caller_net = dev_net(ctx->rxq->dev);
2585 nfct = __bpf_nf_ct_lookup(caller_net, bpf_tuple, len__tuple, opts->l4proto,
2586 opts->netns_id);
2587 if (IS_ERR(nfct)) {
2588 opts->error = PTR_ERR(nfct);
2589 return NULL;
2590 }
2591 return nfct;
2592 }
2593
2594 /* bpf_skb_ct_lookup - Lookup CT entry for the given tuple, and acquire a
2595 * reference to it
2596 *
2597 * Parameters:
2598 * @skb_ctx - Pointer to ctx (__sk_buff) in TC program
2599 * Cannot be NULL
2600 * @bpf_tuple - Pointer to memory representing the tuple to look up
2601 * Cannot be NULL
2602 * @len__tuple - Length of the tuple structure
2603 * Must be one of sizeof(bpf_tuple->ipv4) or
2604 * sizeof(bpf_tuple->ipv6)
2605 * @opts - Additional options for lookup (documented above)
2606 * Cannot be NULL
2607 * @len__opts - Length of the bpf_ct_opts structure
2608 * Must be NF_BPF_CT_OPTS_SZ (12)
2609 */
> 2610 struct nf_conn *bpf_skb_ct_lookup(struct __sk_buff *skb_ctx,
2611 struct bpf_sock_tuple *bpf_tuple,
2612 u32 len__tuple, struct bpf_ct_opts *opts,
2613 u32 len__opts)
2614 {
2615 struct sk_buff *skb = (struct sk_buff *)skb_ctx;
2616 struct net *caller_net;
2617 struct nf_conn *nfct;
2618
2619 BUILD_BUG_ON(sizeof(struct bpf_ct_opts) != NF_BPF_CT_OPTS_SZ);
2620
2621 if (!opts)
2622 return NULL;
2623 if (!bpf_tuple || opts->reserved[0] || opts->reserved[1] ||
2624 opts->reserved[2] || len__opts != NF_BPF_CT_OPTS_SZ) {
2625 opts->error = -EINVAL;
2626 return NULL;
2627 }
2628 caller_net = skb->dev ? dev_net(skb->dev) : sock_net(skb->sk);
2629 nfct = __bpf_nf_ct_lookup(caller_net, bpf_tuple, len__tuple, opts->l4proto,
2630 opts->netns_id);
2631 if (IS_ERR(nfct)) {
2632 opts->error = PTR_ERR(nfct);
2633 return NULL;
2634 }
2635 return nfct;
2636 }
2637
2638 /* bpf_ct_release - Release acquired nf_conn object
2639 *
2640 * This must be invoked for referenced PTR_TO_BTF_ID, and the verifier rejects
2641 * the program if any references remain in the program in all of the explored
2642 * states.
2643 *
2644 * Parameters:
2645 * @nf_conn - Pointer to referenced nf_conn object, obtained using
2646 * bpf_xdp_ct_lookup or bpf_skb_ct_lookup.
2647 */
> 2648 void bpf_ct_release(struct nf_conn *nfct)
2649 {
2650 if (!nfct)
2651 return;
2652 nf_ct_put(nfct);
2653 }
2654
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH bpf-next v3 7/9] net/netfilter: Add unstable CT lookup helpers for XDP and TC-BPF
Date: Fri, 10 Dec 2021 22:28:13 +0800 [thread overview]
Message-ID: <202112102230.6cj0WCoX-lkp@intel.com> (raw)
In-Reply-To: <20211210130230.4128676-8-memxor@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 6271 bytes --]
Hi Kumar,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Kumar-Kartikeya-Dwivedi/Introduce-unstable-CT-lookup-helpers/20211210-210439
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: arc-randconfig-r043-20211210 (https://download.01.org/0day-ci/archive/20211210/202112102230.6cj0WCoX-lkp(a)intel.com/config)
compiler: arc-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/683d78cc594f7867b8dae78b357ab82a5ee69484
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kumar-Kartikeya-Dwivedi/Introduce-unstable-CT-lookup-helpers/20211210-210439
git checkout 683d78cc594f7867b8dae78b357ab82a5ee69484
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash net/netfilter/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> net/netfilter/nf_conntrack_core.c:2566:17: warning: no previous prototype for 'bpf_xdp_ct_lookup' [-Wmissing-prototypes]
2566 | struct nf_conn *bpf_xdp_ct_lookup(struct xdp_md *xdp_ctx,
| ^~~~~~~~~~~~~~~~~
>> net/netfilter/nf_conntrack_core.c:2610:17: warning: no previous prototype for 'bpf_skb_ct_lookup' [-Wmissing-prototypes]
2610 | struct nf_conn *bpf_skb_ct_lookup(struct __sk_buff *skb_ctx,
| ^~~~~~~~~~~~~~~~~
>> net/netfilter/nf_conntrack_core.c:2648:6: warning: no previous prototype for 'bpf_ct_release' [-Wmissing-prototypes]
2648 | void bpf_ct_release(struct nf_conn *nfct)
| ^~~~~~~~~~~~~~
vim +/bpf_xdp_ct_lookup +2566 net/netfilter/nf_conntrack_core.c
2549
2550 /* bpf_xdp_ct_lookup - Lookup CT entry for the given tuple, and acquire a
2551 * reference to it
2552 *
2553 * Parameters:
2554 * @xdp_ctx - Pointer to ctx (xdp_md) in XDP program
2555 * Cannot be NULL
2556 * @bpf_tuple - Pointer to memory representing the tuple to look up
2557 * Cannot be NULL
2558 * @len__tuple - Length of the tuple structure
2559 * Must be one of sizeof(bpf_tuple->ipv4) or
2560 * sizeof(bpf_tuple->ipv6)
2561 * @opts - Additional options for lookup (documented above)
2562 * Cannot be NULL
2563 * @len__opts - Length of the bpf_ct_opts structure
2564 * Must be NF_BPF_CT_OPTS_SZ (12)
2565 */
> 2566 struct nf_conn *bpf_xdp_ct_lookup(struct xdp_md *xdp_ctx,
2567 struct bpf_sock_tuple *bpf_tuple,
2568 u32 len__tuple, struct bpf_ct_opts *opts,
2569 u32 len__opts)
2570 {
2571 struct xdp_buff *ctx = (struct xdp_buff *)xdp_ctx;
2572 struct net *caller_net;
2573 struct nf_conn *nfct;
2574
2575 BUILD_BUG_ON(sizeof(struct bpf_ct_opts) != NF_BPF_CT_OPTS_SZ);
2576
2577 if (!opts)
2578 return NULL;
2579 if (!bpf_tuple || opts->reserved[0] || opts->reserved[1] ||
2580 opts->reserved[2] || len__opts != NF_BPF_CT_OPTS_SZ) {
2581 opts->error = -EINVAL;
2582 return NULL;
2583 }
2584 caller_net = dev_net(ctx->rxq->dev);
2585 nfct = __bpf_nf_ct_lookup(caller_net, bpf_tuple, len__tuple, opts->l4proto,
2586 opts->netns_id);
2587 if (IS_ERR(nfct)) {
2588 opts->error = PTR_ERR(nfct);
2589 return NULL;
2590 }
2591 return nfct;
2592 }
2593
2594 /* bpf_skb_ct_lookup - Lookup CT entry for the given tuple, and acquire a
2595 * reference to it
2596 *
2597 * Parameters:
2598 * @skb_ctx - Pointer to ctx (__sk_buff) in TC program
2599 * Cannot be NULL
2600 * @bpf_tuple - Pointer to memory representing the tuple to look up
2601 * Cannot be NULL
2602 * @len__tuple - Length of the tuple structure
2603 * Must be one of sizeof(bpf_tuple->ipv4) or
2604 * sizeof(bpf_tuple->ipv6)
2605 * @opts - Additional options for lookup (documented above)
2606 * Cannot be NULL
2607 * @len__opts - Length of the bpf_ct_opts structure
2608 * Must be NF_BPF_CT_OPTS_SZ (12)
2609 */
> 2610 struct nf_conn *bpf_skb_ct_lookup(struct __sk_buff *skb_ctx,
2611 struct bpf_sock_tuple *bpf_tuple,
2612 u32 len__tuple, struct bpf_ct_opts *opts,
2613 u32 len__opts)
2614 {
2615 struct sk_buff *skb = (struct sk_buff *)skb_ctx;
2616 struct net *caller_net;
2617 struct nf_conn *nfct;
2618
2619 BUILD_BUG_ON(sizeof(struct bpf_ct_opts) != NF_BPF_CT_OPTS_SZ);
2620
2621 if (!opts)
2622 return NULL;
2623 if (!bpf_tuple || opts->reserved[0] || opts->reserved[1] ||
2624 opts->reserved[2] || len__opts != NF_BPF_CT_OPTS_SZ) {
2625 opts->error = -EINVAL;
2626 return NULL;
2627 }
2628 caller_net = skb->dev ? dev_net(skb->dev) : sock_net(skb->sk);
2629 nfct = __bpf_nf_ct_lookup(caller_net, bpf_tuple, len__tuple, opts->l4proto,
2630 opts->netns_id);
2631 if (IS_ERR(nfct)) {
2632 opts->error = PTR_ERR(nfct);
2633 return NULL;
2634 }
2635 return nfct;
2636 }
2637
2638 /* bpf_ct_release - Release acquired nf_conn object
2639 *
2640 * This must be invoked for referenced PTR_TO_BTF_ID, and the verifier rejects
2641 * the program if any references remain in the program in all of the explored
2642 * states.
2643 *
2644 * Parameters:
2645 * @nf_conn - Pointer to referenced nf_conn object, obtained using
2646 * bpf_xdp_ct_lookup or bpf_skb_ct_lookup.
2647 */
> 2648 void bpf_ct_release(struct nf_conn *nfct)
2649 {
2650 if (!nfct)
2651 return;
2652 nf_ct_put(nfct);
2653 }
2654
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next prev parent reply other threads:[~2021-12-10 14:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-10 13:02 [PATCH bpf-next v3 0/9] Introduce unstable CT lookup helpers Kumar Kartikeya Dwivedi
2021-12-10 13:02 ` [PATCH bpf-next v3 1/9] bpf: Refactor bpf_check_mod_kfunc_call Kumar Kartikeya Dwivedi
2021-12-10 13:02 ` [PATCH bpf-next v3 2/9] bpf: Remove DEFINE_KFUNC_BTF_ID_SET Kumar Kartikeya Dwivedi
2021-12-10 13:02 ` [PATCH bpf-next v3 3/9] bpf: Extend kfunc with PTR_TO_CTX, PTR_TO_MEM argument support Kumar Kartikeya Dwivedi
2021-12-10 13:02 ` [PATCH bpf-next v3 4/9] bpf: Introduce mem, size argument pair support for kfunc Kumar Kartikeya Dwivedi
2021-12-10 13:02 ` [PATCH bpf-next v3 5/9] bpf: Add reference tracking support to kfunc Kumar Kartikeya Dwivedi
2021-12-10 13:02 ` [PATCH bpf-next v3 6/9] bpf: Track provenance for pointers formed from referenced PTR_TO_BTF_ID Kumar Kartikeya Dwivedi
2021-12-10 13:02 ` [PATCH bpf-next v3 7/9] net/netfilter: Add unstable CT lookup helpers for XDP and TC-BPF Kumar Kartikeya Dwivedi
2021-12-10 14:28 ` kernel test robot [this message]
2021-12-10 14:28 ` kernel test robot
2021-12-10 15:09 ` Pablo Neira Ayuso
2021-12-10 15:31 ` Kumar Kartikeya Dwivedi
2021-12-10 23:03 ` Pablo Neira Ayuso
2021-12-11 18:35 ` Toke Høiland-Jørgensen
2021-12-11 19:16 ` Pablo Neira Ayuso
2021-12-13 21:25 ` Toke Høiland-Jørgensen
2021-12-15 23:49 ` Pablo Neira Ayuso
2021-12-10 13:02 ` [PATCH bpf-next v3 8/9] selftests/bpf: Extend kfunc selftests Kumar Kartikeya Dwivedi
2021-12-10 13:02 ` [PATCH bpf-next v3 9/9] selftests/bpf: Add test for unstable CT lookup API Kumar Kartikeya Dwivedi
2021-12-14 14:13 ` Maxim Mikityanskiy
2021-12-14 14:34 ` Kumar Kartikeya Dwivedi
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=202112102230.6cj0WCoX-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=fw@strlen.de \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kbuild-all@lists.01.org \
--cc=maximmi@nvidia.com \
--cc=memxor@gmail.com \
--cc=songliubraving@fb.com \
--cc=yhs@fb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.