[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] Implementing vhost-user-blk device backend
From: |
Stefan Hajnoczi |
Subject: |
Re: [RFC] Implementing vhost-user-blk device backend |
Date: |
Wed, 8 Jan 2020 17:02:21 +0000 |
On Sun, Jan 05, 2020 at 12:06:17AM +0800, Coiby Xu wrote:
> Hi Stefan,
>
> Thank you for reviewing my work! All the improvements have been
> applied except for a small issue regarding object_add.
Excellent, thanks for your work!
> > (qemu) object_add vhost-user-server,id=ID,chardev=CHARDEV,writable=on|off
>
> Currently I implement object_add feature in the following syntax which use
> unix_socket directly instead of chardev,
>
> (qemu) object_add
> vhost-user-server,id=id=disk,unix_socket=/tmp/vhost-user-blk_vhost.socket,name=disk,writable=off
>
> I know in QEMU we can create a socket server using chardev-add,
> (qemu) chardev-add socket,id=char1,path=/tmp/vhost-user-blk_vhost.socket
>
> But it seems it's a bit cumbersome to utilize chardev. Take QMP over socket
> as an example,
>
> $ x86_64-softmmu/qemu-system-x86_64 -drive
> file=dpdk.img,format=raw,if=none,id=disk -device
> ide-hd,drive=disk,bootindex=0 -m 128 -enable-kvm -chardev
> socket,id=mon1,path=/tmp/mon.sock,server,nowait -mon
> chardev=mon1,mode=control,pretty=on
This convenience syntax is fine for now.
Maybe later it will be necessary to use chardev instead if the user
wishes to takes advantage of -chardev socket options (server=on|off,
wait=on|off, tls-creds=..., etc).
> It doesn't support multiple concurrent client connections because of the
> limitation of chardev/char-socket.c.
That's fine, vhost-user UNIX domain sockets typically don't handle
multiple concurrent connections.
Stefan
signature.asc
Description: PGP signature