From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4WDi-0004vh-20 for qemu-devel@nongnu.org; Thu, 03 Dec 2015 10:54:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a4WDg-0007rL-C2 for qemu-devel@nongnu.org; Thu, 03 Dec 2015 10:54:57 -0500 Received: from mail-yk0-x230.google.com ([2607:f8b0:4002:c07::230]:33360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4WDg-0007r6-5f for qemu-devel@nongnu.org; Thu, 03 Dec 2015 10:54:56 -0500 Received: by ykdv3 with SMTP id v3so90444531ykd.0 for ; Thu, 03 Dec 2015 07:54:55 -0800 (PST) MIME-Version: 1.0 Sender: teja.foundation@gmail.com In-Reply-To: <20151203163429-mutt-send-email-victork@redhat.com> References: <20151203163429-mutt-send-email-victork@redhat.com> Date: Thu, 3 Dec 2015 21:24:55 +0530 Message-ID: From: Naredula Janardhana Reddy Content-Type: multipart/alternative; boundary=001a114f848684e62805260069b1 Subject: Re: [Qemu-devel] vhost-user on qemu qemu-2.5.0-rc2 FAILS for multi-queue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Victor Kaplansky Cc: QEMU , "Michael S. Tsirkin" --001a114f848684e62805260069b1 Content-Type: text/plain; charset=UTF-8 Thanks Victor, After setting MQ feature bit in get_feature response, Guest vm can see the MQ feature bit enabled, and all the queues are getting initialized on the vm. Jana On 3 December 2015 at 20:07, Victor Kaplansky wrote: > On Thu, Dec 03, 2015 at 03:11:57PM +0530, Naredula Janardhana Reddy wrote: > > Hi > > I am using the latest qemu-2.5.0-rc2 with vhost-user(with multi-queue, > > with 3 queues) to test multi-queue feature with vhost-user. In the > guest > > vm, multi-queue feature flag is not getting enabled . > > > > On the backend, the backend(user space switch) is receving SET_VRING_ADDR > > message only for the first queue, but set VRING_ENABLE message is > recevied > > for all the 6 rings(or 3 queues). > > > > On the guest vm, "Multi-queue" feature( bit 22) is not enabled in the > host > > features(0x409f0024), due to this guest is not enabling multi-queue. > > > > > > Is the vhost-user with multi-queue is fully implemented in the > > qemu-2.5.0-rc2?. > > > > Thanks > > Jana > > ------------------------------------------------------------------------- > > Pls find the qemu command line and logs : > > > > guest vm command line: > > ../qemu-system-x86_64 -enable-kvm -gdb tcp::1336,server,nowait -m 256M > > -monitor tcp::52001,server,nowait,nodelay -object > > > memory-backend-file,size=256M,id=ram0,prealloc=yes,mem-path=/mnt/hugetlbfs,share=on > > -numa node,memdev=ram0 -mem-prealloc -smp 6 -chardev > > socket,id=char1,path=./p1 -netdev > > vhost-user,id=guest0,chardev=char1,queues=3 -device > > virtio-net-pci,mq=on,vectors=8,mac=00:30:48:DB:5E:01,netdev=guest0 -vnc > :8 > > -serial telnet::50001,server,nowait -serial telnet::50011,server,nowait > > -daemonize -append ipaddr=192.168.122.3 gw=192.168.122.1 hugepages=1 > > hw_clock=0 -kernel ./test_image -drive > > if=virtio,id=hdr0,file=./test_disk,aio=native > > > > log on the guest vm: > > : Matches inside the NETPROBE.... > > 2: VirtioNet: Initializing VIRTIO PCI NET status :1 : pcioaddr:c000 > > 2: VirtioNet: HOSTfeatures :409f0024: capabilitie:40 > > guestfeatures:100024 mask_features:7000ff > > 2:[5] MacAddress, 2:[16] Status, 2:[17] ControlVq, 2:[18] > > RxMode, 2:[19] VLanFilter, 2:[20] RxModeExtra, 2: > > 2: msi vector start :101 num:8 > > 2: create Kernel vmap: msix > :ffffffffd0501000-ffffffffd0502000 > > size:0M > > 2: msix table :ffffffffd0501000 bar addr:febd1000 baroffset:1 > > 2: Kernel Adding to LEAF: private page paddr: febd1004 vaddr: > > ffffffffd0501004 > > 2: addr:ffffffffd0501004 -> Lindex ( 1ff : 1ff : 82 :101 ) > > 2: 3: addr:ffffffffd0501004 -> Lindexloc ( ff8 : ff8 : 410 > :808 ) > > 2: 0: MSIX data :165 address:fee00008 > > 2: 1: MSIX data :166 address:fee00008 > > 2: 2: MSIX data :167 address:fee00008 > > 2: 3: MSIX data :168 address:fee00008 > > 2: 4: MSIX data :169 address:fee00008 > > 2: 5: MSIX data :16a address:fee00008 > > 2: 6: MSIX data :16b address:fee00008 > > 2: 7: MSIX data :16c address:fee00008 > > 2:MSIX... Configured ISR vector:101 numvector:8 ctrl:8007 > > 2: VIRTIONET: pioaddr:c018 MAC address : 0 :30 :48 :db > :1820000005e > > :ffffffff00000001 mis_vector:ffffffff00000065 : max_vqs:1 > > 2: VIRTIONET: initializing MAX VQ's:1 > > > > > > log of user space switch: > > ./vhost ./p1 ./p2 0 > > : ./p1 : ./p2 > > > > > ................................................................................ > > Cmd: VHOST_USER_GET_FEATURES (0x1) > > Flags: 0x1 > > u64: 0x500000000 > > Processing message: VHOST_USER_GET_FEATURES > > _get_features > > New3333 MQ feature as enabled: SIZE: 8 value:40000000 > > Is 0x40000000 returned by the back-end for get_features request? > If so, it has bit 22 cleared, which could explain why MQ feature > is not negotiated. > > -- Victor > > --001a114f848684e62805260069b1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks Victor,=C2=A0=C2=A0 After setting MQ feature b= it in get_feature response, Guest vm can see the MQ feature bit enabled, an= d all the queues are getting initialized on the vm.

Jana

On 3 December= 2015 at 20:07, Victor Kaplansky <victork@redhat.com> wrote= :
On Thu, Dec 03, 2015 a= t 03:11:57PM +0530, Naredula Janardhana Reddy wrote:
> Hi
>=C2=A0 =C2=A0I am using the latest qemu-2.5.0-rc2 with vhost-user(with = multi-queue,
> with 3 queues)=C2=A0 to test multi-queue feature with vhost-user.=C2= =A0 In the guest
> vm, multi-queue feature flag is not getting enabled .
>
> On the backend, the backend(user space switch) is receving SET_VRING_A= DDR
> message only for the first queue, but set VRING_ENABLE message is rece= vied
> for all the 6 rings(or 3 queues).
>
> On the guest vm,=C2=A0 "Multi-queue" feature( bit 22) is not= enabled in the host
> features(0x409f0024), due to this guest is not enabling multi-queue. >
>
> Is the vhost-user with multi-queue is fully implemented in the
> qemu-2.5.0-rc2?.
>
> Thanks
> Jana
> ----------------------------------------------------------------------= ---
> Pls find the qemu command line and logs :
>
> guest vm command line:
>=C2=A0 ../qemu-system-x86_64 -enable-kvm -gdb tcp::1336,server,nowait -= m 256M
> -monitor tcp::52001,server,nowait,nodelay -object
> memory-backend-file,size=3D256M,id=3Dram0,prealloc=3Dyes,mem-path=3D/m= nt/hugetlbfs,share=3Don
> -numa node,memdev=3Dram0 -mem-prealloc -smp 6 -chardev
> socket,id=3Dchar1,path=3D./p1 -netdev
> vhost-user,id=3Dguest0,chardev=3Dchar1,queues=3D3 -device
> virtio-net-pci,mq=3Don,vectors=3D8,mac=3D00:30:48:DB:5E:01,netdev=3Dgu= est0 -vnc :8
> -serial telnet::50001,server,nowait -serial telnet::50011,server,nowai= t
> -daemonize -append ipaddr=3D192.168.122.3 gw=3D192.168.122.1 hugepages= =3D1
> hw_clock=3D0 -kernel ./test_image -drive
> if=3Dvirtio,id=3Dhdr0,file=3D./test_disk,aio=3Dnative
>
> log on the guest vm:
> : Matches inside the NETPROBE....
>=C2=A0 =C2=A0 2:=C2=A0 =C2=A0 VirtioNet: Initializing VIRTIO PCI NET st= atus :1 : pcioaddr:c000
>=C2=A0 =C2=A0 2:=C2=A0 =C2=A0 VirtioNet:=C2=A0 HOSTfeatures :409f0024:= =C2=A0 capabilitie:40
> guestfeatures:100024 mask_features:7000ff
>=C2=A0 =C2=A0 2:[5] MacAddress,=C2=A0 =C2=A02:[16] Status,=C2=A0 =C2=A0= 2:[17] ControlVq,=C2=A0 =C2=A02:[18]
> RxMode,=C2=A0 =C2=A02:[19] VLanFilter,=C2=A0 =C2=A02:[20] RxModeExtra,= =C2=A0 =C2=A02:
>=C2=A0 =C2=A0 2: msi vector start :101 num:8
>=C2=A0 =C2=A0 2:=C2=A0 =C2=A0 =C2=A0 =C2=A0 create Kernel vmap: msix=C2= =A0 =C2=A0:ffffffffd0501000-ffffffffd0502000
> size:0M
>=C2=A0 =C2=A0 2: msix table :ffffffffd0501000=C2=A0 bar addr:febd1000= =C2=A0 baroffset:1
>=C2=A0 =C2=A0 2:=C2=A0 =C2=A0 =C2=A0 =C2=A0 Kernel Adding to LEAF: priv= ate page paddr: febd1004 vaddr:
> ffffffffd0501004
>=C2=A0 =C2=A0 2:=C2=A0 =C2=A0 =C2=A0 =C2=A0 addr:ffffffffd0501004 ->= =C2=A0 Lindex ( 1ff : 1ff : 82 :101 )
>=C2=A0 =C2=A0 2:=C2=A0 =C2=A0 =C2=A0 =C2=A0 3: addr:ffffffffd0501004 -&= gt;=C2=A0 Lindexloc ( ff8 : ff8 : 410 :808 )
>=C2=A0 =C2=A0 2: 0: MSIX=C2=A0 data :165 address:fee00008
>=C2=A0 =C2=A0 2: 1: MSIX=C2=A0 data :166 address:fee00008
>=C2=A0 =C2=A0 2: 2: MSIX=C2=A0 data :167 address:fee00008
>=C2=A0 =C2=A0 2: 3: MSIX=C2=A0 data :168 address:fee00008
>=C2=A0 =C2=A0 2: 4: MSIX=C2=A0 data :169 address:fee00008
>=C2=A0 =C2=A0 2: 5: MSIX=C2=A0 data :16a address:fee00008
>=C2=A0 =C2=A0 2: 6: MSIX=C2=A0 data :16b address:fee00008
>=C2=A0 =C2=A0 2: 7: MSIX=C2=A0 data :16c address:fee00008
>=C2=A0 =C2=A0 2:MSIX... Configured ISR vector:101=C2=A0 numvector:8 ctr= l:8007
>=C2=A0 =C2=A0 2:=C2=A0 =C2=A0 VIRTIONET:=C2=A0 pioaddr:c018 MAC address= : 0 :30 :48 :db :1820000005e
> :ffffffff00000001 mis_vector:ffffffff00000065=C2=A0 =C2=A0: max_vqs:1<= br> >=C2=A0 =C2=A0 2:=C2=A0 =C2=A0 VIRTIONET: initializing MAX VQ's:1 >
>
> log of user space switch:
> ./vhost ./p1 ./p2 0
>=C2=A0 <port1-file>: ./p1 <port2-file>: ./p2
>
> ......................................................................= ..........
> Cmd: VHOST_USER_GET_FEATURES (0x1)
> Flags: 0x1
> u64: 0x500000000
> Processing message: VHOST_USER_GET_FEATURES
> _get_features
>=C2=A0 New3333 MQ feature as enabled: SIZE: 8=C2=A0 value:40000000

Is 0x40000000 returned by the back-end for get_features request= ?
If so, it has bit 22 cleared, which could explain why MQ feature
is not negotiated.

-- Victor


--001a114f848684e62805260069b1--