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/2a267c8f331996de0e26568472c45fe78eb67e1d.1702375338.git.lorenzo%40kernel.org patch subject: [PATCH v4 net-next 1/3] net: introduce page_pool pointer in softnet_data percpu struct config: um-allnoconfig (https://download.01.org/0day-ci/archive/20231213/202312130546.Kst7VY7F-lkp@xxxxxxxxx/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231213/202312130546.Kst7VY7F-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/202312130546.Kst7VY7F-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): /usr/bin/ld: init/main.o: warning: relocation in read-only section `.ref.text' /usr/bin/ld: warning: .tmp_vmlinux.kallsyms1 has a LOAD segment with RWX permissions /usr/bin/ld: net/core/dev.o: in function `net_dev_init': >> net/core/dev.c:11734: undefined reference to `page_pool_create' /usr/bin/ld: warning: creating DT_TEXTREL in a PIE clang: error: linker command failed with exit code 1 (use -v to see invocation) vim +11734 net/core/dev.c 11667 11668 /* 11669 * Initialize the DEV module. At boot time this walks the device list and 11670 * unhooks any devices that fail to initialise (normally hardware not 11671 * present) and leaves us with a valid list of present and active devices. 11672 * 11673 */ 11674 11675 #define SD_PAGE_POOL_RING_SIZE 256 11676 /* 11677 * This is called single threaded during boot, so no need 11678 * to take the rtnl semaphore. 11679 */ 11680 static int __init net_dev_init(void) 11681 { 11682 struct softnet_data *sd; 11683 int i, rc = -ENOMEM; 11684 11685 BUG_ON(!dev_boot_phase); 11686 11687 net_dev_struct_check(); 11688 11689 if (dev_proc_init()) 11690 goto out; 11691 11692 if (netdev_kobject_init()) 11693 goto out; 11694 11695 INIT_LIST_HEAD(&ptype_all); 11696 for (i = 0; i < PTYPE_HASH_SIZE; i++) 11697 INIT_LIST_HEAD(&ptype_base[i]); 11698 11699 if (register_pernet_subsys(&netdev_net_ops)) 11700 goto out; 11701 11702 /* 11703 * Initialise the packet receive queues. 11704 */ 11705 11706 for_each_possible_cpu(i) { 11707 struct work_struct *flush = per_cpu_ptr(&flush_works, i); 11708 struct page_pool_params page_pool_params = { 11709 .pool_size = SD_PAGE_POOL_RING_SIZE, 11710 .nid = NUMA_NO_NODE, 11711 }; 11712 11713 INIT_WORK(flush, flush_backlog); 11714 11715 sd = &per_cpu(softnet_data, i); 11716 skb_queue_head_init(&sd->input_pkt_queue); 11717 skb_queue_head_init(&sd->process_queue); 11718 #ifdef CONFIG_XFRM_OFFLOAD 11719 skb_queue_head_init(&sd->xfrm_backlog); 11720 #endif 11721 INIT_LIST_HEAD(&sd->poll_list); 11722 sd->output_queue_tailp = &sd->output_queue; 11723 #ifdef CONFIG_RPS 11724 INIT_CSD(&sd->csd, rps_trigger_softirq, sd); 11725 sd->cpu = i; 11726 #endif 11727 INIT_CSD(&sd->defer_csd, trigger_rx_softirq, sd); 11728 spin_lock_init(&sd->defer_lock); 11729 11730 init_gro_hash(&sd->backlog); 11731 sd->backlog.poll = process_backlog; 11732 sd->backlog.weight = weight_p; 11733 11734 sd->page_pool = page_pool_create(&page_pool_params); 11735 if (IS_ERR(sd->page_pool)) { 11736 sd->page_pool = NULL; 11737 goto out; 11738 } 11739 page_pool_set_cpuid(sd->page_pool, i); 11740 } 11741 11742 dev_boot_phase = 0; 11743 11744 /* The loopback device is special if any other network devices 11745 * is present in a network namespace the loopback device must 11746 * be present. Since we now dynamically allocate and free the 11747 * loopback device ensure this invariant is maintained by 11748 * keeping the loopback device as the first device on the 11749 * list of network devices. Ensuring the loopback devices 11750 * is the first device that appears and the last network device 11751 * that disappears. 11752 */ 11753 if (register_pernet_device(&loopback_net_ops)) 11754 goto out; 11755 11756 if (register_pernet_device(&default_device_ops)) 11757 goto out; 11758 11759 open_softirq(NET_TX_SOFTIRQ, net_tx_action); 11760 open_softirq(NET_RX_SOFTIRQ, net_rx_action); 11761 11762 rc = cpuhp_setup_state_nocalls(CPUHP_NET_DEV_DEAD, "net/dev:dead", 11763 NULL, dev_cpu_dead); 11764 WARN_ON(rc < 0); 11765 rc = 0; 11766 out: 11767 if (rc < 0) { 11768 for_each_possible_cpu(i) { 11769 sd = &per_cpu(softnet_data, i); 11770 if (!sd->page_pool) 11771 continue; 11772 11773 page_pool_destroy(sd->page_pool); 11774 sd->page_pool = NULL; 11775 } 11776 } 11777 11778 return rc; 11779 } 11780 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki