Re: [PATCH 4/6] tools/virtio: add vring_test.

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

 



On 01/23/2013 07:03 AM, Rusty Russell wrote:
> Asias He <asias@xxxxxxxxxx> writes:
> 
>> On 01/17/2013 06:29 PM, Rusty Russell wrote:
>>> This is mainly to test the drivers/vhost/vringh.c code, but it also
>>> uses the drivers/virtio/virtio_ring.c code for the guest side.
>>
>> vringh_test.c does not compile here:
>> (This series on top of 9a9284153d965a57edc7162a8e57c14c97f3a935)
>>
>> $ cd tools/virtio
>> $ make
>> cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
>> -fno-strict-overflow  -MMD    vringh_test.c   -o vringh_test
>> In file included from ./linux/vringh.h:1:0,
>>                  from ./../../drivers/vhost/vringh.c:6,
>>                  from vringh_test.c:7:
>> ./linux/../../../include/linux/vringh.h:27:28: fatal error:
>> uapi/linux/uio.h: No such file or directory
> 
> Oops, I forgot to add the file... it's a one-liner:
> 
> tools/virtio/uapi/linux/uio.h:
> #include <sys/uio.h>
> 
> I'll make a new branch for this, called vringh.  It'll probably rebase
> as I neaten things up, but I'll try not to go crazy...

It compiles now.

FYI, I got some warnings:

../../drivers/virtio/virtio_ring.c: In function ‘virtqueue_kick_prepare’:
../../drivers/virtio/virtio_ring.c:309:3: warning: dereferencing
type-punned pointer will break strict-aliasing rules [-Wstrict-aliasin
g]
cc   virtio_test.o virtio_ring.o   -o virtio_test
cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
-fno-strict-overflow  -MMD    vringh_test.c   -o vringh_test
In file included from vringh_test.c:7:0:
./../../drivers/vhost/vringh.c: In function ‘check_range’:
./../../drivers/vhost/vringh.c:119:2: warning: format ‘%llx’ expects
argument of type ‘long long unsigned int’, but argument 3 has type
 ‘u64’ [-Wformat]
./../../drivers/vhost/vringh.c: In function ‘__vringh_notify_enable’:
./../../drivers/vhost/vringh.c:402:3: warning: dereferencing type-punned
pointer will break strict-aliasing rules [-Wstrict-aliasing]
./../../drivers/vhost/vringh.c:405:8: warning: dereferencing type-punned
pointer will break strict-aliasing rules [-Wstrict-aliasing]
./../../drivers/vhost/vringh.c: In function ‘vringh_init_user’:
./../../drivers/vhost/vringh.c:499:3: warning: format ‘%zu’ expects
argument of type ‘size_t’, but argument 2 has type ‘unsigned int’ [
-Wformat]
./../../drivers/vhost/vringh.c: In function ‘vringh_init_kern’:
./../../drivers/vhost/vringh.c:707:3: warning: format ‘%zu’ expects
argument of type ‘size_t’, but argument 2 has type ‘unsigned int’ [
-Wformat]
In file included from vringh_test.c:8:0:
./../../drivers/virtio/virtio_ring.c: In function ‘virtqueue_kick_prepare’:
./../../drivers/virtio/virtio_ring.c:309:3: warning: dereferencing
type-punned pointer will break strict-aliasing rules [-Wstrict-alias
ing]

...


-- 
Asias
_______________________________________________
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