oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pavel Begunkov <asml.silence@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [isilence:zcrx/next 25/27] drivers/net/ethernet/broadcom/bnxt/bnxt.c:1242:67: error: implicit declaration of function 'io_iov_get_page'; did you mean 'iov_iter_get_pages2'?
Date: Thu, 16 May 2024 20:59:03 +0800	[thread overview]
Message-ID: <202405162009.sogTdGw5-lkp@intel.com> (raw)

tree:   https://github.com/isilence/linux zcrx/next
head:   8f99f44fc1fabf943cf0d1989f0afdff15e064e8
commit: 26fa2c4456e3c703b1dc7d61ec32180e4e7864d6 [25/27] wip: bnxt
config: i386-buildonly-randconfig-004-20240516 (https://download.01.org/0day-ci/archive/20240516/202405162009.sogTdGw5-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240516/202405162009.sogTdGw5-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405162009.sogTdGw5-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/x86/include/asm/page.h:89,
                    from arch/x86/include/asm/processor.h:20,
                    from arch/x86/include/asm/timex.h:5,
                    from include/linux/timex.h:67,
                    from include/linux/time32.h:13,
                    from include/linux/time.h:60,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:13,
                    from drivers/net/ethernet/broadcom/bnxt/bnxt.c:11:
   drivers/net/ethernet/broadcom/bnxt/bnxt.c: In function '__bnxt_rx_agg_pages':
>> drivers/net/ethernet/broadcom/bnxt/bnxt.c:1242:67: error: implicit declaration of function 'io_iov_get_page'; did you mean 'iov_iter_get_pages2'? [-Werror=implicit-function-declaration]
    1242 |                         phys_addr_t page_phys_addr = page_to_phys(io_iov_get_page(netmem));
         |                                                                   ^~~~~~~~~~~~~~~
   include/asm-generic/memory_model.h:19:51: note: in definition of macro '__page_to_pfn'
      19 | #define __page_to_pfn(page)     ((unsigned long)((page) - mem_map) + \
         |                                                   ^~~~
   drivers/net/ethernet/broadcom/bnxt/bnxt.c:1242:54: note: in expansion of macro 'page_to_phys'
    1242 |                         phys_addr_t page_phys_addr = page_to_phys(io_iov_get_page(netmem));
         |                                                      ^~~~~~~~~~~~
   include/asm-generic/memory_model.h:19:57: error: invalid operands to binary - (have 'int' and 'struct page *')
      19 | #define __page_to_pfn(page)     ((unsigned long)((page) - mem_map) + \
         |                                                  ~~~~~~ ^
   include/asm-generic/memory_model.h:64:21: note: in expansion of macro '__page_to_pfn'
      64 | #define page_to_pfn __page_to_pfn
         |                     ^~~~~~~~~~~~~
   arch/x86/include/asm/io.h:156:44: note: in expansion of macro 'page_to_pfn'
     156 | #define page_to_phys(page)    ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT)
         |                                            ^~~~~~~~~~~
   drivers/net/ethernet/broadcom/bnxt/bnxt.c:1242:54: note: in expansion of macro 'page_to_phys'
    1242 |                         phys_addr_t page_phys_addr = page_to_phys(io_iov_get_page(netmem));
         |                                                      ^~~~~~~~~~~~
   drivers/net/ethernet/broadcom/bnxt/bnxt.c: In function 'bnxt_alloc_rx_page_pool':
>> drivers/net/ethernet/broadcom/bnxt/bnxt.c:3685:47: error: 'io_uring_pp_zc_ops' undeclared (first use in this function)
    3685 |                 pp.queue->mp_params.mp_ops = &io_uring_pp_zc_ops;
         |                                               ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/broadcom/bnxt/bnxt.c:3685:47: note: each undeclared identifier is reported only once for each function it appears in
   cc1: some warnings being treated as errors


vim +1242 drivers/net/ethernet/broadcom/bnxt/bnxt.c

  1197	
  1198	static u32 __bnxt_rx_agg_pages(struct bnxt *bp,
  1199				       struct bnxt_cp_ring_info *cpr,
  1200				       struct skb_shared_info *shinfo,
  1201				       u16 idx, u32 agg_bufs, bool tpa,
  1202				       struct xdp_buff *xdp)
  1203	{
  1204		struct bnxt_napi *bnapi = cpr->bnapi;
  1205		struct pci_dev *pdev = bp->pdev;
  1206		struct bnxt_rx_ring_info *rxr = bnapi->rx_ring;
  1207		u16 prod = rxr->rx_agg_prod;
  1208		u32 i, total_frag_len = 0;
  1209		bool p5_tpa = false;
  1210	
  1211		if ((bp->flags & BNXT_FLAG_CHIP_P5_PLUS) && tpa)
  1212			p5_tpa = true;
  1213	
  1214		for (i = 0; i < agg_bufs; i++) {
  1215			skb_frag_t *frag = &shinfo->frags[i];
  1216			u16 cons, frag_len;
  1217			struct rx_agg_cmp *agg;
  1218			struct bnxt_sw_rx_agg_bd *cons_rx_buf;
  1219			struct page *page;
  1220			dma_addr_t mapping;
  1221			netmem_ref netmem;
  1222	
  1223			if (p5_tpa)
  1224				agg = bnxt_get_tpa_agg_p5(bp, rxr, idx, i);
  1225			else
  1226				agg = bnxt_get_agg(bp, cpr, idx, i);
  1227			cons = agg->rx_agg_cmp_opaque;
  1228			frag_len = (le32_to_cpu(agg->rx_agg_cmp_len_flags_type) &
  1229				    RX_AGG_CMP_LEN) >> RX_AGG_CMP_LEN_SHIFT;
  1230	
  1231			cons_rx_buf = &rxr->rx_agg_ring[cons];
  1232			// NOTE: sets frag->netmem and frag->offset and frag->size
  1233			// page is a netmem, and is net_iov if queue is 1
  1234			// frag->netmem = page_to_netmem(page)
  1235			skb_frag_fill_page_desc(frag, cons_rx_buf->page,
  1236						cons_rx_buf->offset, frag_len);
  1237			if (rxr->zc_enabled) {
  1238				WARN_ON(!skb_frag_is_net_iov(frag));
  1239				netmem = page_to_netmem(cons_rx_buf->page);
  1240				printk(KERN_INFO "----- __bnxt_rx_agg_pages: adding frag=%d, total agg_bufs=%d\n", i, agg_bufs);
  1241				// buf = container_of(netmem_to_net_iov(netmem), struct io_zc_rx_buf, niov);
> 1242				phys_addr_t page_phys_addr = page_to_phys(io_iov_get_page(netmem));
  1243				printk(KERN_INFO "----- __bnxt_rx_agg_pages: Page physical address: %#llx, dma_addr_t: %#lx\n", (unsigned long long)page_phys_addr, netmem_get_dma_addr(netmem));
  1244			}
  1245			shinfo->nr_frags = i + 1;
  1246			__clear_bit(cons, rxr->rx_agg_bmap);
  1247	
  1248			/* It is possible for bnxt_alloc_rx_page() to allocate
  1249			 * a sw_prod index that equals the cons index, so we
  1250			 * need to clear the cons entry now.
  1251			 */
  1252			mapping = cons_rx_buf->mapping;
  1253			// NOTE: page is saved here only for alloc failures
  1254			page = cons_rx_buf->page;
  1255			cons_rx_buf->page = NULL;
  1256	
  1257			if (xdp && page_is_pfmemalloc(page))
  1258				xdp_buff_set_frag_pfmemalloc(xdp);
  1259	
  1260			// NOTE: realloc a page for the nulled out rx_agg_buf
  1261			if (bnxt_alloc_rx_page(bp, rxr, prod, GFP_ATOMIC) != 0) {
  1262				--shinfo->nr_frags;
  1263				cons_rx_buf->page = page;
  1264	
  1265				/* Update prod since possibly some pages have been
  1266				 * allocated already.
  1267				 */
  1268				rxr->rx_agg_prod = prod;
  1269				bnxt_reuse_rx_agg_bufs(cpr, idx, i, agg_bufs - i, tpa);
  1270				return 0;
  1271			}
  1272	
  1273			dma_sync_single_for_cpu(&pdev->dev, mapping, BNXT_RX_PAGE_SIZE,
  1274						bp->rx_dir);
  1275	
  1276			total_frag_len += frag_len;
  1277			prod = NEXT_RX_AGG(prod);
  1278		}
  1279		rxr->rx_agg_prod = prod;
  1280		return total_frag_len;
  1281	}
  1282	

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

                 reply	other threads:[~2024-05-16 13:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202405162009.sogTdGw5-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=asml.silence@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).