Content-Type: multipart/mixed; boundary="===============1520912928585468743==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [RFC Patch v3 2/3] bpf: introduce skb map Date: Sun, 26 Dec 2021 15:56:52 +0800 Message-ID: <202112261343.mHcO6jk0-lkp@intel.com> In-Reply-To: <20211224200059.161979-3-xiyou.wangcong@gmail.com> List-Id: --===============1520912928585468743== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Cong, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on bpf-next/master] [also build test WARNING on net-next/master next-20211224] [cannot apply to bpf/master net/master horms-ipvs/master linus/master v5.16= -rc6] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Cong-Wang/net_sched-introd= uce-eBPF-based-Qdisc/20211225-040205 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git ma= ster config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/202112= 26/202112261343.mHcO6jk0-lkp(a)intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=3D1 build): # https://github.com/0day-ci/linux/commit/98f78772173d9f0122cbeedab= fd01bbd531e1da3 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Cong-Wang/net_sched-introduce-eBPF= -based-Qdisc/20211225-040205 git checkout 98f78772173d9f0122cbeedabfd01bbd531e1da3 # save the config file to linux build tree mkdir build_dir make W=3D1 O=3Dbuild_dir ARCH=3Dx86_64 SHELL=3D/bin/bash drivers/gp= io/ kernel/bpf/ net/key/ net/sched/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> kernel/bpf/skb_map.c:160:5: warning: no previous prototype for 'skb_map_= enqueue' [-Wmissing-prototypes] 160 | int skb_map_enqueue(struct sk_buff *skb, struct bpf_map *map, u6= 4 key) | ^~~~~~~~~~~~~~~ >> kernel/bpf/skb_map.c:180:17: warning: no previous prototype for 'skb_map= _dequeue' [-Wmissing-prototypes] 180 | struct sk_buff *skb_map_dequeue(struct bpf_map *map) | ^~~~~~~~~~~~~~~ vim +/skb_map_enqueue +160 kernel/bpf/skb_map.c 159 = > 160 int skb_map_enqueue(struct sk_buff *skb, struct bpf_map *map, u64 ke= y) 161 { 162 struct bpf_skb_map *pq =3D bpf_skb_map(map); 163 struct skb_map_node *n; 164 unsigned long flags; 165 = 166 if (atomic_inc_return(&pq->count) > pq->map.max_entries) 167 return -ENOBUFS; 168 n =3D alloc_skb_map_node(pq); 169 if (!n) 170 return -ENOMEM; 171 n->key =3D key; 172 n->skb =3D skb_get(skb); 173 raw_spin_lock_irqsave(&pq->lock, flags); 174 pq_push(&pq->root, &n->node); 175 raw_spin_unlock_irqrestore(&pq->lock, flags); 176 return 0; 177 = 178 } 179 = > 180 struct sk_buff *skb_map_dequeue(struct bpf_map *map) 181 { 182 struct bpf_skb_map *pq =3D bpf_skb_map(map); 183 struct skb_map_node *n; 184 struct pq_node *node; 185 unsigned long flags; 186 = 187 raw_spin_lock_irqsave(&pq->lock, flags); 188 node =3D pq_pop(&pq->root); 189 if (!node) { 190 raw_spin_unlock_irqrestore(&pq->lock, flags); 191 return NULL; 192 } 193 raw_spin_unlock_irqrestore(&pq->lock, flags); 194 n =3D container_of(node, struct skb_map_node, node); 195 consume_skb(n->skb); 196 atomic_dec(&pq->count); 197 return n->skb; 198 } 199 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============1520912928585468743==--