Re: [PATCH vhost 11/22] virtio_net: sq support premapped mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx/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@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/202310131711.QjbkIwe0-lkp@xxxxxxxxx/

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
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux