Re: [PATCH bpf-next v1 1/2] xdp: recycle Page Pool backed skbs built from XDP frames
From: kernel test robot
Date: Wed Mar 01 2023 - 14:19:46 EST
Hi Alexander,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Alexander-Lobakin/xdp-recycle-Page-Pool-backed-skbs-built-from-XDP-frames/20230302-000635
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20230301160315.1022488-2-aleksander.lobakin%40intel.com
patch subject: [PATCH bpf-next v1 1/2] xdp: recycle Page Pool backed skbs built from XDP frames
config: x86_64-randconfig-a014 (https://download.01.org/0day-ci/archive/20230302/202303020342.Wi2PRFFH-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/a5ca5578e9bd35220be091fd02df96d492120ee3
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Alexander-Lobakin/xdp-recycle-Page-Pool-backed-skbs-built-from-XDP-frames/20230302-000635
git checkout a5ca5578e9bd35220be091fd02df96d492120ee3
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202303020342.Wi2PRFFH-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
>> net/core/xdp.c:662:3: error: implicit declaration of function 'skb_mark_for_recycle' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
skb_mark_for_recycle(skb);
^
1 error generated.
vim +/skb_mark_for_recycle +662 net/core/xdp.c
614
615 struct sk_buff *__xdp_build_skb_from_frame(struct xdp_frame *xdpf,
616 struct sk_buff *skb,
617 struct net_device *dev)
618 {
619 struct skb_shared_info *sinfo = xdp_get_shared_info_from_frame(xdpf);
620 unsigned int headroom, frame_size;
621 void *hard_start;
622 u8 nr_frags;
623
624 /* xdp frags frame */
625 if (unlikely(xdp_frame_has_frags(xdpf)))
626 nr_frags = sinfo->nr_frags;
627
628 /* Part of headroom was reserved to xdpf */
629 headroom = sizeof(*xdpf) + xdpf->headroom;
630
631 /* Memory size backing xdp_frame data already have reserved
632 * room for build_skb to place skb_shared_info in tailroom.
633 */
634 frame_size = xdpf->frame_sz;
635
636 hard_start = xdpf->data - headroom;
637 skb = build_skb_around(skb, hard_start, frame_size);
638 if (unlikely(!skb))
639 return NULL;
640
641 skb_reserve(skb, headroom);
642 __skb_put(skb, xdpf->len);
643 if (xdpf->metasize)
644 skb_metadata_set(skb, xdpf->metasize);
645
646 if (unlikely(xdp_frame_has_frags(xdpf)))
647 xdp_update_skb_shared_info(skb, nr_frags,
648 sinfo->xdp_frags_size,
649 nr_frags * xdpf->frame_sz,
650 xdp_frame_is_frag_pfmemalloc(xdpf));
651
652 /* Essential SKB info: protocol and skb->dev */
653 skb->protocol = eth_type_trans(skb, dev);
654
655 /* Optional SKB info, currently missing:
656 * - HW checksum info (skb->ip_summed)
657 * - HW RX hash (skb_set_hash)
658 * - RX ring dev queue index (skb_record_rx_queue)
659 */
660
661 if (xdpf->mem.type == MEM_TYPE_PAGE_POOL)
> 662 skb_mark_for_recycle(skb);
663
664 /* Allow SKB to reuse area used by xdp_frame */
665 xdp_scrub_frame(xdpf);
666
667 return skb;
668 }
669 EXPORT_SYMBOL_GPL(__xdp_build_skb_from_frame);
670
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests