From: kernel test robot <lkp@intel.com>
To: Shunsuke Mie <mie@igel.co.jp>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH 4/4] PCI: endpoint: function: Add EP function driver to provide virtio net device
Date: Sat, 4 Feb 2023 09:05:21 +0800 [thread overview]
Message-ID: <202302040802.0lalFaV7-lkp@intel.com> (raw)
In-Reply-To: <20230203100418.2981144-5-mie@igel.co.jp>
Hi Shunsuke,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on helgaas-pci/next]
[also build test WARNING on helgaas-pci/for-linus linus/master v6.2-rc6 next-20230203]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Shunsuke-Mie/virtio_pci-add-a-definition-of-queue-flag-in-ISR/20230203-180631
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
patch link: https://lore.kernel.org/r/20230203100418.2981144-5-mie%40igel.co.jp
patch subject: [RFC PATCH 4/4] PCI: endpoint: function: Add EP function driver to provide virtio net device
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20230204/202302040802.0lalFaV7-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 12.1.0
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/a76cd5956970d04bf5e4e72da87cfdaa4da86164
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Shunsuke-Mie/virtio_pci-add-a-definition-of-queue-flag-in-ISR/20230203-180631
git checkout a76cd5956970d04bf5e4e72da87cfdaa4da86164
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/pci/endpoint/functions/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/pci/endpoint/functions/pci-epf-vnet.c: In function 'epf_vnet_dma_callback':
drivers/pci/endpoint/functions/pci-epf-vnet.c:166:9: error: implicit declaration of function 'vringh_complete'; did you mean 'vringh_complete_kern'? [-Werror=implicit-function-declaration]
166 | vringh_complete(param->tx_vrh, param->tx_head, param->total_len);
| ^~~~~~~~~~~~~~~
| vringh_complete_kern
drivers/pci/endpoint/functions/pci-epf-vnet.c: In function 'epf_vnet_transfer':
drivers/pci/endpoint/functions/pci-epf-vnet.c:200:15: error: implicit declaration of function 'vringh_getdesc'; did you mean 'vringh_getdesc_kern'? [-Werror=implicit-function-declaration]
200 | err = vringh_getdesc(tx_vrh, tx_iov, NULL, &tx_head);
| ^~~~~~~~~~~~~~
| vringh_getdesc_kern
drivers/pci/endpoint/functions/pci-epf-vnet.c:213:17: error: implicit declaration of function 'vringh_abandon'; did you mean 'vringh_abandon_kern'? [-Werror=implicit-function-declaration]
213 | vringh_abandon(tx_vrh, tx_head);
| ^~~~~~~~~~~~~~
| vringh_abandon_kern
>> drivers/pci/endpoint/functions/pci-epf-vnet.c:251:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
251 | lbase = (u64)liov->iov[liov->i].iov_base;
| ^
drivers/pci/endpoint/functions/pci-epf-vnet.c:252:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
252 | rbase = (u64)riov->iov[riov->i].iov_base;
| ^
cc1: some warnings being treated as errors
--
drivers/pci/endpoint/functions/pci-epf-vnet-rc.c: In function 'epf_vnet_rc_epc_mmap':
drivers/pci/endpoint/functions/pci-epf-vnet-rc.c:424:15: error: implicit declaration of function 'pci_epc_mem_align'; did you mean 'pci_epc_mem_exit'? [-Werror=implicit-function-declaration]
424 | err = pci_epc_mem_align(epf->epc, pci_addr, len, &aaddr, &asize);
| ^~~~~~~~~~~~~~~~~
| pci_epc_mem_exit
drivers/pci/endpoint/functions/pci-epf-vnet-rc.c: In function 'epf_vnet_rc_process_ctrlq_entry':
drivers/pci/endpoint/functions/pci-epf-vnet-rc.c:489:15: error: implicit declaration of function 'vringh_getdesc'; did you mean 'vringh_getdesc_kern'? [-Werror=implicit-function-declaration]
489 | err = vringh_getdesc(vrh, riov, wiov, &head);
| ^~~~~~~~~~~~~~
| vringh_getdesc_kern
>> drivers/pci/endpoint/functions/pci-epf-vnet-rc.c:495:42: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
495 | rmem = epf_vnet_rc_epc_mmap(epf, (u64)riov->iov[riov->i].iov_base,
| ^
drivers/pci/endpoint/functions/pci-epf-vnet-rc.c:502:42: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
502 | wmem = epf_vnet_rc_epc_mmap(epf, (u64)wiov->iov[wiov->i].iov_base,
| ^
drivers/pci/endpoint/functions/pci-epf-vnet-rc.c:535:9: error: implicit declaration of function 'vringh_complete'; did you mean 'vringh_complete_kern'? [-Werror=implicit-function-declaration]
535 | vringh_complete(vrh, head, total_len);
| ^~~~~~~~~~~~~~~
| vringh_complete_kern
drivers/pci/endpoint/functions/pci-epf-vnet-rc.c:542:9: error: implicit declaration of function 'vringh_abandon'; did you mean 'vringh_abandon_kern'? [-Werror=implicit-function-declaration]
542 | vringh_abandon(vrh, head);
| ^~~~~~~~~~~~~~
| vringh_abandon_kern
cc1: some warnings being treated as errors
--
drivers/pci/endpoint/functions/pci-epf-vnet-ep.c: In function 'epf_vnet_ep_process_ctrlq_entry':
drivers/pci/endpoint/functions/pci-epf-vnet-ep.c:55:15: error: implicit declaration of function 'vringh_getdesc'; did you mean 'vringh_getdesc_kern'? [-Werror=implicit-function-declaration]
55 | err = vringh_getdesc(vrh, riov, wiov, &head);
| ^~~~~~~~~~~~~~
| vringh_getdesc_kern
In file included from include/asm-generic/bug.h:22,
from arch/arc/include/asm/bug.h:30,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/preempt.h:5,
from ./arch/arc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:56,
from include/linux/kref.h:16,
from include/linux/configfs.h:25,
from include/linux/pci-epf.h:12,
from include/linux/pci-epc.h:12,
from drivers/pci/endpoint/functions/pci-epf-vnet-ep.c:5:
>> drivers/pci/endpoint/functions/pci-epf-vnet-ep.c:61:26: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
61 | pr_debug("Command is too short: %ld\n", len);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:347:21: note: in definition of macro 'pr_fmt'
347 | #define pr_fmt(fmt) fmt
| ^~~
include/linux/dynamic_debug.h:247:9: note: in expansion of macro '__dynamic_func_call_cls'
247 | __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:249:9: note: in expansion of macro '_dynamic_func_call_cls'
249 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:268:9: note: in expansion of macro '_dynamic_func_call'
268 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:581:9: note: in expansion of macro 'dynamic_pr_debug'
581 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
drivers/pci/endpoint/functions/pci-epf-vnet-ep.c:61:17: note: in expansion of macro 'pr_debug'
61 | pr_debug("Command is too short: %ld\n", len);
| ^~~~~~~~
drivers/pci/endpoint/functions/pci-epf-vnet-ep.c:61:51: note: format string is defined here
61 | pr_debug("Command is too short: %ld\n", len);
| ~~^
| |
| long int
| %d
drivers/pci/endpoint/functions/pci-epf-vnet-ep.c:91:9: error: implicit declaration of function 'vringh_complete'; did you mean 'vringh_complete_kern'? [-Werror=implicit-function-declaration]
91 | vringh_complete(vrh, head, len);
| ^~~~~~~~~~~~~~~
| vringh_complete_kern
In file included from include/linux/cpumask.h:15,
from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/spinlock.h:63:
drivers/pci/endpoint/functions/pci-epf-vnet-ep.c: In function 'epf_vnet_ep_vdev_find_vqs':
include/linux/gfp_types.h:333:25: warning: passing argument 5 of 'vringh_init_kern' makes pointer from integer without a cast [-Wint-conversion]
333 | #define GFP_KERNEL (__GFP_RECLAIM | __GFP_IO | __GFP_FS)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| unsigned int
drivers/pci/endpoint/functions/pci-epf-vnet-ep.c:255:46: note: in expansion of macro 'GFP_KERNEL'
255 | true, GFP_KERNEL, vring->desc,
| ^~~~~~~~~~
In file included from include/linux/pci-epf-virtio.h:9,
from drivers/pci/endpoint/functions/pci-epf-vnet.h:6,
from drivers/pci/endpoint/functions/pci-epf-vnet-ep.c:10:
include/linux/vringh.h:174:41: note: expected 'struct vring_desc *' but argument is of type 'unsigned int'
174 | struct vring_desc *desc,
| ~~~~~~~~~~~~~~~~~~~^~~~
drivers/pci/endpoint/functions/pci-epf-vnet-ep.c:255:63: error: passing argument 6 of 'vringh_init_kern' from incompatible pointer type [-Werror=incompatible-pointer-types]
255 | true, GFP_KERNEL, vring->desc,
| ~~~~~^~~~~~
| |
| vring_desc_t * {aka struct vring_desc *}
include/linux/vringh.h:175:42: note: expected 'struct vring_avail *' but argument is of type 'vring_desc_t *' {aka 'struct vring_desc *'}
175 | struct vring_avail *avail,
| ~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/pci/endpoint/functions/pci-epf-vnet-ep.c:256:45: error: passing argument 7 of 'vringh_init_kern' from incompatible pointer type [-Werror=incompatible-pointer-types]
256 | vring->avail, vring->used);
| ~~~~~^~~~~~~
| |
| vring_avail_t * {aka struct vring_avail *}
include/linux/vringh.h:176:41: note: expected 'struct vring_used *' but argument is of type 'vring_avail_t *' {aka 'struct vring_avail *'}
176 | struct vring_used *used);
| ~~~~~~~~~~~~~~~~~~~^~~~
drivers/pci/endpoint/functions/pci-epf-vnet-ep.c:254:23: error: too many arguments to function 'vringh_init_kern'
254 | err = vringh_init_kern(vrh, vnet->virtio_features, vq_size,
| ^~~~~~~~~~~~~~~~
include/linux/vringh.h:172:5: note: declared here
172 | int vringh_init_kern(struct vringh *vrh, u64 features,
| ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +251 drivers/pci/endpoint/functions/pci-epf-vnet.c
174
175 /**
176 * epf_vnet_transfer() - transfer data between tx vring to rx vring using edma
177 * @vnet: epf virtio net device to do dma
178 * @tx_vrh: vringh related to source tx vring
179 * @rx_vrh: vringh related to target rx vring
180 * @tx_iov: buffer to use tx
181 * @rx_iov: buffer to use rx
182 * @dir: a direction of DMA. local to remote or local from remote
183 *
184 * This function returns 0, 1 or error number. The 0 indicates there is not
185 * data to send. The 1 indicates a request to DMA is succeeded. Other error
186 * numbers shows error, however, ENOSPC means there is no buffer on target
187 * vring, so should retry to call later.
188 */
189 int epf_vnet_transfer(struct epf_vnet *vnet, struct vringh *tx_vrh,
190 struct vringh *rx_vrh, struct vringh_kiov *tx_iov,
191 struct vringh_kiov *rx_iov,
192 enum dma_transfer_direction dir)
193 {
194 int err;
195 u16 tx_head, rx_head;
196 size_t total_tx_len;
197 struct epf_vnet_dma_callback_param *cb_param;
198 struct vringh_kiov *liov, *riov;
199
200 err = vringh_getdesc(tx_vrh, tx_iov, NULL, &tx_head);
201 if (err <= 0)
202 return err;
203
204 total_tx_len = vringh_kiov_length(tx_iov);
205
206 err = vringh_getdesc(rx_vrh, NULL, rx_iov, &rx_head);
207 if (err < 0) {
208 goto err_tx_complete;
209 } else if (!err) {
210 /* There is not space on a vring of destination to transmit data, so
211 * rollback tx vringh
212 */
213 vringh_abandon(tx_vrh, tx_head);
214 return -ENOSPC;
215 }
216
217 cb_param = kmalloc(sizeof(*cb_param), GFP_KERNEL);
218 if (!cb_param) {
219 err = -ENOMEM;
220 goto err_rx_complete;
221 }
222
223 cb_param->tx_vrh = tx_vrh;
224 cb_param->rx_vrh = rx_vrh;
225 cb_param->tx_head = tx_head;
226 cb_param->rx_head = rx_head;
227 cb_param->total_len = total_tx_len;
228 cb_param->vnet = vnet;
229
230 switch (dir) {
231 case DMA_MEM_TO_DEV:
232 liov = tx_iov;
233 riov = rx_iov;
234 cb_param->vq = vnet->ep.txvq;
235 break;
236 case DMA_DEV_TO_MEM:
237 liov = rx_iov;
238 riov = tx_iov;
239 cb_param->vq = vnet->ep.rxvq;
240 break;
241 default:
242 err = -EINVAL;
243 goto err_free_param;
244 }
245
246 for (; tx_iov->i < tx_iov->used; tx_iov->i++, rx_iov->i++) {
247 size_t len;
248 u64 lbase, rbase;
249 void (*callback)(void *) = NULL;
250
> 251 lbase = (u64)liov->iov[liov->i].iov_base;
252 rbase = (u64)riov->iov[riov->i].iov_base;
253 len = tx_iov->iov[tx_iov->i].iov_len;
254
255 if (tx_iov->i + 1 == tx_iov->used)
256 callback = epf_vnet_dma_callback;
257
258 err = epf_vnet_dma_single(vnet, rbase, lbase, len, callback,
259 cb_param, dir);
260 if (err)
261 goto err_free_param;
262 }
263
264 return 1;
265
266 err_free_param:
267 kfree(cb_param);
268 err_rx_complete:
269 vringh_complete(rx_vrh, rx_head, vringh_kiov_length(rx_iov));
270 err_tx_complete:
271 vringh_complete(tx_vrh, tx_head, total_tx_len);
272
273 return err;
274 }
275
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-02-04 1:05 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-03 10:04 [RFC PATCH 0/4] PCI: endpoint: Introduce a virtio-net EP function Shunsuke Mie
2023-02-03 10:04 ` Shunsuke Mie
2023-02-03 10:04 ` [RFC PATCH 1/4] virtio_pci: add a definition of queue flag in ISR Shunsuke Mie
2023-02-03 10:04 ` Shunsuke Mie
2023-02-03 10:16 ` Michael S. Tsirkin
2023-02-03 10:16 ` Michael S. Tsirkin
2023-02-07 10:06 ` Shunsuke Mie
2023-02-07 10:06 ` Shunsuke Mie
2023-02-03 10:04 ` [RFC PATCH 2/4] virtio_ring: remove const from vring getter Shunsuke Mie
2023-02-03 10:04 ` Shunsuke Mie
2023-02-03 10:04 ` [RFC PATCH 3/4] PCI: endpoint: Introduce virtio library for EP functions Shunsuke Mie
2023-02-03 10:04 ` Shunsuke Mie
2023-02-03 10:20 ` Michael S. Tsirkin
2023-02-03 10:20 ` Michael S. Tsirkin
2023-02-07 11:05 ` Shunsuke Mie
2023-02-07 11:05 ` Shunsuke Mie
2023-02-03 10:04 ` [RFC PATCH 4/4] PCI: endpoint: function: Add EP function driver to provide virtio net device Shunsuke Mie
2023-02-03 10:04 ` Shunsuke Mie
2023-02-03 10:22 ` Michael S. Tsirkin
2023-02-03 10:22 ` Michael S. Tsirkin
2023-02-03 22:15 ` [EXT] " Frank Li
2023-02-07 10:56 ` Shunsuke Mie
2023-02-07 10:56 ` Shunsuke Mie
2023-02-07 15:37 ` Frank Li
2023-02-08 5:46 ` Shunsuke Mie
2023-02-08 5:46 ` Shunsuke Mie
2023-02-07 10:47 ` Shunsuke Mie
2023-02-07 10:47 ` Shunsuke Mie
2023-02-03 11:58 ` kernel test robot
2023-02-04 1:05 ` kernel test robot [this message]
2023-02-03 16:45 ` [EXT] [RFC PATCH 0/4] PCI: endpoint: Introduce a virtio-net EP function Frank Li
2023-02-07 10:29 ` Shunsuke Mie
2023-02-07 10:29 ` Shunsuke Mie
2023-02-07 16:02 ` Frank Li
2023-02-14 3:27 ` Shunsuke Mie
2023-02-14 3:27 ` Shunsuke Mie
2023-03-29 16:46 ` Frank Li
2023-04-05 1:22 ` Shunsuke Mie
2023-04-05 1:22 ` Shunsuke Mie
2023-04-11 10:22 ` Shunsuke Mie
2023-04-11 10:22 ` Shunsuke Mie
2023-02-03 21:48 ` Frank Li
2023-02-07 1:43 ` Shunsuke Mie
2023-02-07 1:43 ` Shunsuke Mie
2023-02-07 3:27 ` Shunsuke Mie
2023-02-07 3:27 ` Shunsuke Mie
2023-02-05 10:01 ` Michael S. Tsirkin
2023-02-05 10:01 ` Michael S. Tsirkin
2023-02-07 10:17 ` Shunsuke Mie
2023-02-07 10:17 ` Shunsuke Mie
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=202302040802.0lalFaV7-lkp@intel.com \
--to=lkp@intel.com \
--cc=mie@igel.co.jp \
--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.