[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202112291851.QYCzexRJ-lkp@intel.com>
Date: Wed, 29 Dec 2021 18:52:02 +0800
From: kernel test robot <lkp@...el.com>
To: Cong Wang <cong.wang@...edance.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [congwang:sch_bpf 2/3] kernel/bpf/skb_map.c:160:5: warning: no
previous prototype for 'skb_map_enqueue'
tree: https://github.com/congwang/linux.git sch_bpf
head: 5fb0da1e47e0c68da0323a3e0399b2628a13e999
commit: bc7c943a32f707b17d62bcbf4cca59f3e0de8d65 [2/3] bpf: introduce skb map
config: arc-randconfig-r043-20211228 (https://download.01.org/0day-ci/archive/20211229/202112291851.QYCzexRJ-lkp@intel.com/config)
compiler: arceb-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/congwang/linux/commit/bc7c943a32f707b17d62bcbf4cca59f3e0de8d65
git remote add congwang https://github.com/congwang/linux.git
git fetch --no-tags congwang sch_bpf
git checkout bc7c943a32f707b17d62bcbf4cca59f3e0de8d65
# 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 drivers/reset/ kernel/bpf/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
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, u64 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 key)
161 {
162 struct bpf_skb_map *pq = 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 = alloc_skb_map_node(pq);
169 if (!n)
170 return -ENOMEM;
171 n->key = key;
172 n->skb = 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 = 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 = 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 = 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@lists.01.org
Powered by blists - more mailing lists