qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Changpeng Liu <changpeng.liu@intel.com>, qemu-devel@nongnu.org
Cc: stefanha@gmail.com, mst@redhat.com, marcandre.lureau@redhat.com,
	felipe@nutanix.com, james.r.harris@intel.com
Subject: Re: [Qemu-devel] [PATCH v4 2/4] vhost-user-blk: introduce a new vhost-user-blk host device
Date: Thu, 19 Oct 2017 13:33:07 +0200	[thread overview]
Message-ID: <f5ffd96f-8060-2c22-e6f9-49eab8cfe7c7@redhat.com> (raw)
In-Reply-To: <1508390650-19115-3-git-send-email-changpeng.liu@intel.com>

On 19/10/2017 07:24, Changpeng Liu wrote:
>    ;;
>    --enable-vhost-scsi) vhost_scsi="yes"
>    ;;
> +  --disable-vhost-user-blk) vhost_user_blk="no"
> +  ;;
> +  --enable-vhost-user-blk) vhost_user_blk="yes"
> +  ;;
>    --disable-vhost-vsock) vhost_vsock="no"
>    ;;
>    --enable-vhost-vsock) vhost_vsock="yes"
> @@ -1511,6 +1517,7 @@ disabled with --disable-FEATURE, default is enabled if available:
>    cap-ng          libcap-ng support
>    attr            attr and xattr support
>    vhost-net       vhost-net acceleration support
> +  vhost-user-blk  VM virtio-blk acceleration in user space

Please use default-configs instead of a new configure switch.  See how
CONFIG_VHOST_USER_SCSI is used in default-configs/pci.mak and
default-configs/s390x-softmmu.mak.

> 
> +static const int user_feature_bits[] = {
> +    VIRTIO_BLK_F_SIZE_MAX,
> +    VIRTIO_BLK_F_SEG_MAX,
> +    VIRTIO_BLK_F_GEOMETRY,
> +    VIRTIO_BLK_F_BLK_SIZE,
> +    VIRTIO_BLK_F_TOPOLOGY,
> +    VIRTIO_BLK_F_SCSI,

Please omit VIRTIO_BLK_F_SCSI, it's a legacy option that is not anymore
part of virtio 1.0.

> +    VIRTIO_BLK_F_MQ,
> +    VIRTIO_BLK_F_RO,
> +    VIRTIO_BLK_F_FLUSH,
> +    VIRTIO_BLK_F_BARRIER,

Same for VIRTIO_BLK_F_BARRIER.

> +    VIRTIO_BLK_F_WCE,

And VIRTIO_BLK_F_WCE is the same as VIRTIO_BLK_F_FLUSH, so it can be
removed too.  Please include VIRTIO_BLK_F_CONFIG_WCE instead, since you
are supporting it in vhost_user_blk_set_config.

> +    VIRTIO_F_VERSION_1,
> +    VIRTIO_RING_F_INDIRECT_DESC,
> +    VIRTIO_RING_F_EVENT_IDX,
> +    VIRTIO_F_NOTIFY_ON_EMPTY,
> +    VHOST_INVALID_FEATURE_BIT
> +};

> 
> +static const TypeInfo vhost_user_blk_info = {
> +    .name = TYPE_VHOST_USER_BLK,
> +    .parent = TYPE_VIRTIO_DEVICE,
> +    .instance_size = sizeof(VHostUserBlk),
> +    .instance_init = vhost_user_blk_instance_init,
> +    .class_init = vhost_user_blk_class_init,
> +};
> +

There is some code duplication, so maybe it's worth introducing a common
superclass like TYPE_VIRTIO_SCSI_COMMON.  I'll let others comment on
whether this is a requirement.

Paolo

  reply	other threads:[~2017-10-19 11:33 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-19  5:24 [Qemu-devel] [PATCH v4 0/4] *** Introduce a new vhost-user-blk host device to Qemu *** Changpeng Liu
2017-10-19  5:24 ` [Qemu-devel] [PATCH v4 1/4] vhost-user: add new vhost user messages to support virtio config space Changpeng Liu
2017-10-19 11:37   ` Paolo Bonzini
2017-10-19 14:09   ` Stefan Hajnoczi
2017-10-19 15:36     ` Michael S. Tsirkin
2017-10-20 10:00       ` Stefan Hajnoczi
2017-10-23  4:47         ` Liu, Changpeng
2017-10-23 17:26           ` Stefan Hajnoczi
2017-10-24  0:52             ` Liu, Changpeng
2017-10-24 13:00               ` Stefan Hajnoczi
2017-10-19 15:39   ` Michael S. Tsirkin
2017-10-19 15:43     ` Paolo Bonzini
2017-10-19 17:43       ` Michael S. Tsirkin
2017-10-19 21:04         ` Paolo Bonzini
2017-10-20  0:27           ` Michael S. Tsirkin
2017-10-20  1:55             ` Liu, Changpeng
2017-10-20  2:12               ` Michael S. Tsirkin
2017-10-20  2:34                 ` Liu, Changpeng
2017-10-19  5:24 ` [Qemu-devel] [PATCH v4 2/4] vhost-user-blk: introduce a new vhost-user-blk host device Changpeng Liu
2017-10-19 11:33   ` Paolo Bonzini [this message]
2017-10-20  1:38     ` Liu, Changpeng
2017-10-19 15:17   ` Stefan Hajnoczi
2017-10-20  1:47     ` Liu, Changpeng
2017-10-20  9:54       ` Stefan Hajnoczi
2017-10-23  4:26         ` Liu, Changpeng
2017-10-23 12:55           ` Michael S. Tsirkin
2017-10-24  0:40             ` Liu, Changpeng
2017-10-23 17:11           ` Stefan Hajnoczi
2017-10-24  0:44             ` Liu, Changpeng
2017-10-24 12:53               ` Stefan Hajnoczi
2017-10-25  1:34                 ` Liu, Changpeng
2017-11-03 14:50                   ` Stefan Hajnoczi
2017-10-19  5:24 ` [Qemu-devel] [PATCH v4 3/4] contrib/libvhost-user: enable virtio config space messages Changpeng Liu
2017-10-19  5:24 ` [Qemu-devel] [PATCH v4 4/4] contrib/vhost-user-blk: introduce a vhost-user-blk sample application Changpeng Liu
2017-10-19 11:43   ` Paolo Bonzini
2017-10-20  1:39     ` Liu, Changpeng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f5ffd96f-8060-2c22-e6f9-49eab8cfe7c7@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=changpeng.liu@intel.com \
    --cc=felipe@nutanix.com \
    --cc=james.r.harris@intel.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).