[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202310131711.QjbkIwe0-lkp@intel.com>
Date: Fri, 13 Oct 2023 18:13:06 +0800
From: kernel test robot <lkp@...el.com>
To: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
virtualization@...ts.linux-foundation.org
Cc: oe-kbuild-all@...ts.linux.dev, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Jesper Dangaard Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>, netdev@...r.kernel.org,
bpf@...r.kernel.org
Subject: Re: [PATCH vhost 11/22] virtio_net: sq support premapped mode
Hi Xuan,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.6-rc5 next-20231013]
[cannot apply to mst-vhost/linux-next]
[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/Xuan-Zhuo/virtio_ring-virtqueue_set_dma_premapped-support-disable/20231011-180709
base: linus/master
patch link: https://lore.kernel.org/r/20231011092728.105904-12-xuanzhuo%40linux.alibaba.com
patch subject: [PATCH vhost 11/22] virtio_net: sq support premapped mode
config: parisc-randconfig-001-20231013 (https://download.01.org/0day-ci/archive/20231013/202310131711.QjbkIwe0-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231013/202310131711.QjbkIwe0-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310131711.QjbkIwe0-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/net/virtio/main.c:25:
drivers/net/virtio/virtio_net.h: In function 'virtnet_sq_unmap':
>> drivers/net/virtio/virtio_net.h:235:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
235 | head = (void *)((u64)data & ~VIRTIO_XMIT_DATA_MASK);
| ^
>> drivers/net/virtio/virtio_net.h:235:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
235 | head = (void *)((u64)data & ~VIRTIO_XMIT_DATA_MASK);
| ^
drivers/net/virtio/main.c: In function 'virtnet_sq_map_sg':
>> drivers/net/virtio/main.c:600:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
600 | return (void *)((u64)head | ((u64)data & VIRTIO_XMIT_DATA_MASK));
| ^
drivers/net/virtio/main.c:600:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
600 | return (void *)((u64)head | ((u64)data & VIRTIO_XMIT_DATA_MASK));
| ^
>> drivers/net/virtio/main.c:600:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
600 | return (void *)((u64)head | ((u64)data & VIRTIO_XMIT_DATA_MASK));
| ^
drivers/net/virtio/main.c: In function 'virtnet_find_vqs':
drivers/net/virtio/main.c:3977:48: warning: '%d' directive writing between 1 and 11 bytes into a region of size 10 [-Wformat-overflow=]
3977 | sprintf(vi->rq[i].name, "input.%d", i);
| ^~
drivers/net/virtio/main.c:3977:41: note: directive argument in the range [-2147483641, 65534]
3977 | sprintf(vi->rq[i].name, "input.%d", i);
| ^~~~~~~~~~
drivers/net/virtio/main.c:3977:17: note: 'sprintf' output between 8 and 18 bytes into a destination of size 16
3977 | sprintf(vi->rq[i].name, "input.%d", i);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/virtio/main.c:3978:49: warning: '%d' directive writing between 1 and 11 bytes into a region of size 9 [-Wformat-overflow=]
3978 | sprintf(vi->sq[i].name, "output.%d", i);
| ^~
drivers/net/virtio/main.c:3978:41: note: directive argument in the range [-2147483641, 65534]
3978 | sprintf(vi->sq[i].name, "output.%d", i);
| ^~~~~~~~~~~
drivers/net/virtio/main.c:3978:17: note: 'sprintf' output between 9 and 19 bytes into a destination of size 16
3978 | sprintf(vi->sq[i].name, "output.%d", i);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +235 drivers/net/virtio/virtio_net.h
230
231 static inline void *virtnet_sq_unmap(struct virtnet_sq *sq, void *data)
232 {
233 struct virtnet_sq_dma *next, *head;
234
> 235 head = (void *)((u64)data & ~VIRTIO_XMIT_DATA_MASK);
236
237 data = head->data;
238
239 while (head) {
240 virtqueue_dma_unmap_page_attrs(sq->vq, head->addr, head->len, DMA_TO_DEVICE, 0);
241
242 next = head->next;
243
244 head->next = sq->dmainfo.free;
245 sq->dmainfo.free = head;
246
247 head = next;
248 }
249
250 return data;
251 }
252
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists