tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
queue-4.14
head: baa67d3d69c44ce8c5d720cb707244cb006dc253
commit: baa67d3d69c44ce8c5d720cb707244cb006dc253 [1/1] virtio_net: Do not pull payload in
skb->head
config: x86_64-randconfig-a014-20210411 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
00ef28ef21f0a46059203c5aa96e9febe1192e43)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
#
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-4.14
git checkout baa67d3d69c44ce8c5d720cb707244cb006dc253
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> drivers/net/virtio_net.c:348:21: error: use of undeclared
identifier 'metasize'
copy = ETH_HLEN + metasize;
^
1 error generated.
vim +/metasize +348 drivers/net/virtio_net.c
307
308 /* Called from bottom half context */
309 static struct sk_buff *page_to_skb(struct virtnet_info *vi,
310 struct receive_queue *rq,
311 struct page *page, unsigned int offset,
312 unsigned int len, unsigned int truesize,
313 bool hdr_valid)
314 {
315 struct sk_buff *skb;
316 struct virtio_net_hdr_mrg_rxbuf *hdr;
317 unsigned int copy, hdr_len, hdr_padded_len;
318 char *p;
319
320 p = page_address(page) + offset;
321
322 /* copy small packet so we can reuse these pages for small data */
323 skb = napi_alloc_skb(&rq->napi, GOOD_COPY_LEN);
324 if (unlikely(!skb))
325 return NULL;
326
327 hdr = skb_vnet_hdr(skb);
328
329 hdr_len = vi->hdr_len;
330 if (vi->mergeable_rx_bufs)
331 hdr_padded_len = sizeof(*hdr);
332 else
333 hdr_padded_len = sizeof(struct padded_vnet_hdr);
334
335 if (hdr_valid)
336 memcpy(hdr, p, hdr_len);
337
338 len -= hdr_len;
339 offset += hdr_padded_len;
340 p += hdr_padded_len;
341
342 /* Copy all frame if it fits skb->head, otherwise
343 * we let virtio_net_hdr_to_skb() and GRO pull headers as needed.
344 */
345 if (len <= skb_tailroom(skb))
346 copy = len;
347 else
348 copy = ETH_HLEN + metasize;
349 skb_put_data(skb, p,
copy);
350
351 len -= copy;
352 offset += copy;
353
354 if (vi->mergeable_rx_bufs) {
355 if (len)
356 skb_add_rx_frag(skb, 0, page, offset, len, truesize);
357 else
358 put_page(page);
359 return skb;
360 }
361
362 /*
363 * Verify that we can indeed put this data into a skb.
364 * This is here to handle cases when the device erroneously
365 * tries to receive more than is possible. This is usually
366 * the case of a broken device.
367 */
368 if (unlikely(len > MAX_SKB_FRAGS * PAGE_SIZE)) {
369 net_dbg_ratelimited("%s: too much data\n", skb->dev->name);
370 dev_kfree_skb(skb);
371 return NULL;
372 }
373 BUG_ON(offset >= PAGE_SIZE);
374 while (len) {
375 unsigned int frag_size = min((unsigned)PAGE_SIZE - offset, len);
376 skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, page, offset,
377 frag_size, truesize);
378 len -= frag_size;
379 page = (struct page *)page->private;
380 offset = 0;
381 }
382
383 if (page)
384 give_pages(rq, page);
385
386 return skb;
387 }
388
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org