Re: [PATCH v4 net-next 3/3] xdp: add multi-buff support for xdp running in generic mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lorenzo,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Lorenzo-Bianconi/net-introduce-page_pool-pointer-in-softnet_data-percpu-struct/20231212-181103
base:   net-next/main
patch link:    https://lore.kernel.org/r/2d0f9388c6509192d88e359a402517a73124b50e.1702375338.git.lorenzo%40kernel.org
patch subject: [PATCH v4 net-next 3/3] xdp: add multi-buff support for xdp running in generic mode
config: sh-edosk7760_defconfig (https://download.01.org/0day-ci/archive/20231213/202312130625.4PfR5846-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231213/202312130625.4PfR5846-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312130625.4PfR5846-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   sh4-linux-ld: net/core/dev.o: in function `netif_skb_segment_for_xdp':
>> net/core/dev.c:5003:(.text+0x2860): undefined reference to `page_pool_alloc_frag'
>> sh4-linux-ld: net/core/dev.c:5003:(.text+0x28fc): undefined reference to `page_pool_alloc_pages'
   sh4-linux-ld: net/core/dev.o: in function `net_dev_init':
   net/core/dev.c:11882:(.init.text+0x198): undefined reference to `page_pool_create'


vim +5003 net/core/dev.c

  4932	
  4933	static int netif_skb_segment_for_xdp(struct sk_buff **pskb)
  4934	{
  4935		struct softnet_data *sd = this_cpu_ptr(&softnet_data);
  4936		u32 size, truesize, len, max_head_size, off;
  4937		struct sk_buff *skb = *pskb, *nskb;
  4938		int err, i, head_off;
  4939		void *data;
  4940	
  4941		max_head_size = SKB_WITH_OVERHEAD(PAGE_SIZE - XDP_PACKET_HEADROOM);
  4942		if (skb->len > max_head_size + MAX_SKB_FRAGS * PAGE_SIZE)
  4943			return -ENOMEM;
  4944	
  4945		size = min_t(u32, skb->len, max_head_size);
  4946		truesize = SKB_HEAD_ALIGN(size) + XDP_PACKET_HEADROOM;
  4947		data = page_pool_dev_alloc_va(sd->page_pool, &truesize);
  4948		if (!data)
  4949			return -ENOMEM;
  4950	
  4951		nskb = napi_build_skb(data, truesize);
  4952		if (!nskb) {
  4953			page_pool_free_va(sd->page_pool, data, true);
  4954			return -ENOMEM;
  4955		}
  4956	
  4957		skb_reserve(nskb, XDP_PACKET_HEADROOM);
  4958		skb_copy_header(nskb, skb);
  4959		skb_mark_for_recycle(nskb);
  4960	
  4961		err = skb_copy_bits(skb, 0, nskb->data, size);
  4962		if (err) {
  4963			consume_skb(nskb);
  4964			return err;
  4965		}
  4966		skb_put(nskb, size);
  4967	
  4968		head_off = skb_headroom(nskb) - skb_headroom(skb);
  4969		skb_headers_offset_update(nskb, head_off);
  4970	
  4971		off = size;
  4972		len = skb->len - off;
  4973		for (i = 0; i < MAX_SKB_FRAGS && off < skb->len; i++) {
  4974			struct page *page;
  4975			u32 page_off;
  4976	
  4977			size = min_t(u32, len, PAGE_SIZE);
  4978			truesize = size;
  4979	
  4980			page = page_pool_dev_alloc(sd->page_pool, &page_off,
  4981						   &truesize);
  4982			if (!data) {
  4983				consume_skb(nskb);
  4984				return -ENOMEM;
  4985			}
  4986	
  4987			skb_add_rx_frag(nskb, i, page, page_off, size, truesize);
  4988			err = skb_copy_bits(skb, off, page_address(page) + page_off,
  4989					    size);
  4990			if (err) {
  4991				consume_skb(nskb);
  4992				return err;
  4993			}
  4994	
  4995			len -= size;
  4996			off += size;
  4997		}
  4998	
  4999		consume_skb(skb);
  5000		*pskb = nskb;
  5001	
  5002		return 0;
> 5003	}
  5004	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux