From: kernel test robot <lkp@intel.com>
To: John Fastabend <john.fastabend@gmail.com>,
cong.wang@bytedance.com, jakub@cloudflare.com,
daniel@iogearbox.net, lmb@isovalent.com, edumazet@google.com
Cc: oe-kbuild-all@lists.linux.dev, john.fastabend@gmail.com,
bpf@vger.kernel.org, netdev@vger.kernel.org, ast@kernel.org,
andrii@kernel.org, will@isovalent.com
Subject: Re: [PATCH bpf v3 07/12] bpf: sockmap incorrectly handling copied_seq
Date: Tue, 4 Apr 2023 11:02:13 +0800 [thread overview]
Message-ID: <202304041013.HATc3V5L-lkp@intel.com> (raw)
In-Reply-To: <20230403200138.937569-8-john.fastabend@gmail.com>
Hi John,
kernel test robot noticed the following build errors:
[auto build test ERROR on bpf/master]
url: https://github.com/intel-lab-lkp/linux/commits/John-Fastabend/bpf-sockmap-pass-skb-ownership-through-read_skb/20230404-040431
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git master
patch link: https://lore.kernel.org/r/20230403200138.937569-8-john.fastabend%40gmail.com
patch subject: [PATCH bpf v3 07/12] bpf: sockmap incorrectly handling copied_seq
config: sparc64-randconfig-r025-20230403 (https://download.01.org/0day-ci/archive/20230404/202304041013.HATc3V5L-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/fbafbc850ec4ef5aa7e5c39d8133f291ec4c0bb8
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review John-Fastabend/bpf-sockmap-pass-skb-ownership-through-read_skb/20230404-040431
git checkout fbafbc850ec4ef5aa7e5c39d8133f291ec4c0bb8
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc64 SHELL=/bin/bash net/core/ net/ipv4/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304041013.HATc3V5L-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
net/core/skmsg.c: In function 'sk_psock_verdict_apply':
>> net/core/skmsg.c:1056:17: error: implicit declaration of function 'tcp_eat_skb'; did you mean 'tcp_read_skb'? [-Werror=implicit-function-declaration]
1056 | tcp_eat_skb(psock->sk, skb);
| ^~~~~~~~~~~
| tcp_read_skb
cc1: some warnings being treated as errors
--
>> net/ipv4/tcp_bpf.c:14:6: warning: no previous prototype for 'tcp_eat_skb' [-Wmissing-prototypes]
14 | void tcp_eat_skb(struct sock *sk, struct sk_buff *skb)
| ^~~~~~~~~~~
vim +1056 net/core/skmsg.c
986
987 static int sk_psock_verdict_apply(struct sk_psock *psock, struct sk_buff *skb,
988 int verdict)
989 {
990 struct sk_psock_work_state *state;
991 struct sock *sk_other;
992 int err = 0;
993 u32 len, off;
994
995 switch (verdict) {
996 case __SK_PASS:
997 err = -EIO;
998 sk_other = psock->sk;
999 if (sock_flag(sk_other, SOCK_DEAD) ||
1000 !sk_psock_test_state(psock, SK_PSOCK_TX_ENABLED)) {
1001 skb_bpf_redirect_clear(skb);
1002 goto out_free;
1003 }
1004
1005 skb_bpf_set_ingress(skb);
1006
1007 /* We need to grab mutex here because in-flight skb is in one of
1008 * the following states: either on ingress_skb, in psock->state
1009 * or being processed by backlog and neither in state->skb and
1010 * ingress_skb may be also empty. The troublesome case is when
1011 * the skb has been dequeued from ingress_skb list or taken from
1012 * state->skb because we can not easily test this case. Maybe we
1013 * could be clever with flags and resolve this but being clever
1014 * got us here in the first place and we note this is done under
1015 * sock lock and backlog conditions mean we are already running
1016 * into ENOMEM or other performance hindering cases so lets do
1017 * the obvious thing and grab the mutex.
1018 */
1019 mutex_lock(&psock->work_mutex);
1020 state = &psock->work_state;
1021
1022 /* If the queue is empty then we can submit directly
1023 * into the msg queue. If its not empty we have to
1024 * queue work otherwise we may get OOO data. Otherwise,
1025 * if sk_psock_skb_ingress errors will be handled by
1026 * retrying later from workqueue.
1027 */
1028 if (skb_queue_empty(&psock->ingress_skb) && likely(!state->skb)) {
1029 len = skb->len;
1030 off = 0;
1031 if (skb_bpf_strparser(skb)) {
1032 struct strp_msg *stm = strp_msg(skb);
1033
1034 off = stm->offset;
1035 len = stm->full_len;
1036 }
1037 err = sk_psock_skb_ingress_self(psock, skb, off, len);
1038 }
1039 if (err < 0) {
1040 spin_lock_bh(&psock->ingress_lock);
1041 if (sk_psock_test_state(psock, SK_PSOCK_TX_ENABLED)) {
1042 skb_queue_tail(&psock->ingress_skb, skb);
1043 schedule_delayed_work(&psock->work, 0);
1044 err = 0;
1045 }
1046 spin_unlock_bh(&psock->ingress_lock);
1047 if (err < 0) {
1048 skb_bpf_redirect_clear(skb);
1049 mutex_unlock(&psock->work_mutex);
1050 goto out_free;
1051 }
1052 }
1053 mutex_unlock(&psock->work_mutex);
1054 break;
1055 case __SK_REDIRECT:
> 1056 tcp_eat_skb(psock->sk, skb);
1057 err = sk_psock_skb_redirect(psock, skb);
1058 break;
1059 case __SK_DROP:
1060 default:
1061 out_free:
1062 tcp_eat_skb(psock->sk, skb);
1063 skb_bpf_redirect_clear(skb);
1064 sock_drop(psock->sk, skb);
1065 }
1066
1067 return err;
1068 }
1069
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-04-04 3:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 20:01 [PATCH bpf v3 00/12] bpf sockmap fixes John Fastabend
2023-04-03 20:01 ` [PATCH bpf v3 01/12] bpf: sockmap, pass skb ownership through read_skb John Fastabend
2023-04-04 2:10 ` kernel test robot
2023-04-03 20:01 ` [PATCH bpf v3 02/12] bpf: sockmap, convert schedule_work into delayed_work John Fastabend
2023-04-03 20:01 ` [PATCH bpf v3 03/12] bpf: sockmap, improved check for empty queue John Fastabend
2023-04-03 20:01 ` [PATCH bpf v3 04/12] bpf: sockmap, handle fin correctly John Fastabend
2023-04-03 20:01 ` [PATCH bpf v3 05/12] bpf: sockmap, TCP data stall on recv before accept John Fastabend
2023-04-03 20:01 ` [PATCH bpf v3 06/12] bpf: sockmap, wake up polling after data copy John Fastabend
2023-04-03 20:01 ` [PATCH bpf v3 07/12] bpf: sockmap incorrectly handling copied_seq John Fastabend
2023-04-04 3:02 ` kernel test robot [this message]
2023-04-04 3:12 ` kernel test robot
2023-04-03 20:01 ` [PATCH bpf v3 08/12] bpf: sockmap, pull socket helpers out of listen test for general use John Fastabend
2023-04-03 20:01 ` [PATCH bpf v3 09/12] bpf: sockmap, build helper to create connected socket pair John Fastabend
2023-04-03 20:01 ` [PATCH bpf v3 10/12] bpf: sockmap, test shutdown() correctly exits epoll and recv()=0 John Fastabend
2023-04-03 20:01 ` [PATCH bpf v3 11/12] bpf: sockmap, test FIONREAD returns correct bytes in rx buffer John Fastabend
2023-04-03 20:01 ` [PATCH bpf v3 12/12] bpf: sockmap, test FIONREAD returns correct bytes in rx buffer with drops John Fastabend
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=202304041013.HATc3V5L-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=cong.wang@bytedance.com \
--cc=daniel@iogearbox.net \
--cc=edumazet@google.com \
--cc=jakub@cloudflare.com \
--cc=john.fastabend@gmail.com \
--cc=lmb@isovalent.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=will@isovalent.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.