From: kernel test robot <lkp@intel.com>
To: David Wei <davidhwei@meta.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [isilence:zc/veth 1009/1018] include/net/data_pool.h:91:24: error: implicit declaration of function 'io_zc_rx_buf_dma'; did you mean 'io_zc_rx_put_buf'?
Date: Wed, 18 Oct 2023 06:21:21 +0800 [thread overview]
Message-ID: <202310180641.WLtF9f46-lkp@intel.com> (raw)
tree: https://github.com/isilence/linux zc/veth
head: cff8a226d561bc0db814b65ca5d2c97894d4d1cd
commit: 9f51c6d3364cc1430726f2a50a81be50174722a6 [1009/1018] netdev/bnxt: add data pool and use it in BNXT driver
config: x86_64-randconfig-013-20231018 (https://download.01.org/0day-ci/archive/20231018/202310180641.WLtF9f46-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231018/202310180641.WLtF9f46-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/202310180641.WLtF9f46-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/net/data_pool.h:4,
from drivers/net/ethernet/broadcom/bnxt/bnxt.c:58:
include/linux/io_uring.h:131:6: warning: no previous prototype for 'io_zc_rx_put_buf' [-Wmissing-prototypes]
131 | void io_zc_rx_put_buf(struct io_zc_rx_ifq *ifq, struct io_zc_rx_buf *buf)
| ^~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/broadcom/bnxt/bnxt.c:58:
include/net/data_pool.h: In function 'data_pool_get_dma_addr':
>> include/net/data_pool.h:91:24: error: implicit declaration of function 'io_zc_rx_buf_dma'; did you mean 'io_zc_rx_put_buf'? [-Werror=implicit-function-declaration]
91 | return io_zc_rx_buf_dma(buf);
| ^~~~~~~~~~~~~~~~
| io_zc_rx_put_buf
drivers/net/ethernet/broadcom/bnxt/bnxt.c: In function 'bnxt_vf_target_id':
drivers/net/ethernet/broadcom/bnxt/bnxt.c:5212:42: error: invalid use of undefined type 'struct bnxt_vf_info'
5212 | struct bnxt_vf_info *vf = &pf->vf[vf_idx];
| ^
drivers/net/ethernet/broadcom/bnxt/bnxt.c:5214:18: error: invalid use of undefined type 'struct bnxt_vf_info'
5214 | return vf->fw_fid;
| ^~
drivers/net/ethernet/broadcom/bnxt/bnxt.c:5215:1: error: control reaches end of non-void function [-Werror=return-type]
5215 | }
| ^
cc1: some warnings being treated as errors
vim +91 include/net/data_pool.h
3
> 4 #include <linux/io_uring.h>
5 #include <linux/io_uring_types.h>
6 #include <linux/mm_types.h>
7 #include <linux/netdevice.h>
8 #include <net/netdev_rx_queue.h>
9
10 static inline struct netdev_rx_queue *
11 data_pool_get_rx_queue(struct net_device *dev, unsigned int q_idx)
12 {
13 if (q_idx >= dev->num_rx_queues)
14 return NULL;
15 return __netif_get_rx_queue(dev, q_idx);
16 }
17
18 static inline int data_pool_set_page_pool(struct net_device *dev,
19 unsigned int q_idx,
20 struct page_pool *pool)
21 {
22 struct netdev_rx_queue *rxq;
23
24 rxq = data_pool_get_rx_queue(dev, q_idx);
25 if (!rxq)
26 return -EINVAL;
27
28 rxq->page_pool = pool;
29 return 0;
30 }
31
32 static inline int data_pool_set_zc_ifq(struct net_device *dev,
33 unsigned int q_idx,
34 struct io_zc_rx_ifq *ifq)
35 {
36 struct netdev_rx_queue *rxq;
37
38 rxq = data_pool_get_rx_queue(dev, q_idx);
39 if (!rxq)
40 return -EINVAL;
41
42 rxq->zc_ifq = ifq;
43 return 0;
44 }
45
46 static inline struct page *data_pool_alloc_page(struct netdev_rx_queue *rxq)
47 {
48 if (rxq->zc_ifq) {
49 struct io_zc_rx_buf *buf;
50 buf = io_zc_rx_get_buf(rxq->zc_ifq);
51 if (!buf)
52 return NULL;
53 return buf->page;
54 } else {
55 return page_pool_dev_alloc_pages(rxq->page_pool);
56 }
57 }
58
59 static inline void data_pool_fragment_page(struct netdev_rx_queue *rxq,
60 struct page *page,
61 unsigned long bias)
62 {
63 if (rxq->zc_ifq) {
64 struct io_zc_rx_buf *buf;
65 buf = io_zc_rx_buf_from_page(rxq->zc_ifq, page);
66 atomic_set(&buf->refcount, bias);
67 } else {
68 page_pool_fragment_page(page, bias);
69 }
70 }
71
72 static inline void data_pool_put_page(struct netdev_rx_queue *rxq,
73 struct page *page)
74 {
75 if (rxq->zc_ifq) {
76 struct io_zc_rx_buf *buf;
77 buf = io_zc_rx_buf_from_page(rxq->zc_ifq, page);
78 io_zc_rx_put_buf(rxq->zc_ifq, buf);
79 } else {
80 WARN_ON_ONCE(page->pp_magic != PP_SIGNATURE);
81 page_pool_recycle_direct(rxq->page_pool, page);
82 }
83 }
84
85 static inline dma_addr_t data_pool_get_dma_addr(struct netdev_rx_queue *rxq,
86 struct page *page)
87 {
88 if (rxq->zc_ifq) {
89 struct io_zc_rx_buf *buf;
90 buf = io_zc_rx_buf_from_page(rxq->zc_ifq, page);
> 91 return io_zc_rx_buf_dma(buf);
92 } else {
93 return page_pool_get_dma_addr(page);
94 }
95 }
96
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-10-17 22:21 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=202310180641.WLtF9f46-lkp@intel.com \
--to=lkp@intel.com \
--cc=davidhwei@meta.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.