All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Qemu-devel] [PATCH] vhost-user-scsi: add missing virtqueue_size param
  2017-11-14 16:28 [Qemu-devel] [PATCH] vhost-user-scsi: add missing virtqueue_size param Dariusz Stojaczyk
@ 2017-11-14 13:18 ` Richard W.M. Jones
  2017-11-14 13:27 ` Paolo Bonzini
  2017-11-14 20:57 ` Michael S. Tsirkin
  2 siblings, 0 replies; 4+ messages in thread
From: Richard W.M. Jones @ 2017-11-14 13:18 UTC (permalink / raw)
  To: Dariusz Stojaczyk; +Cc: qemu-devel, Paolo Bonzini, Michael S . Tsirkin

On Tue, Nov 14, 2017 at 05:28:36PM +0100, Dariusz Stojaczyk wrote:
> Commit 5c0919d0 [1] introduced virtqueue_size parameter
> for common virtio-scsi path, without updaing the vhost-user-scsi
> code. vhost-user-scsi devices right now report size 0 for each vq.
> 
> This patch introduces virtqueue_size param to vhost-user-scsi,
> that can now be set by the user. However, the most importantly, it
> now has a default value of 128 (same as QEMU's virtio-scsi).
> 
> [1] 5c0919d0 ("virtio-scsi: Add virtqueue_size parameter
> allowing virtqueue size to be set.")
> 
> Change-Id: I70e87eab702ebf1196c028dbf17d54fdc0c89a14
> Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
> ---
>  hw/scsi/vhost-user-scsi.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c
> index 500fa6a..f7561e2 100644
> --- a/hw/scsi/vhost-user-scsi.c
> +++ b/hw/scsi/vhost-user-scsi.c
> @@ -135,6 +135,8 @@ static Property vhost_user_scsi_properties[] = {
>      DEFINE_PROP_CHR("chardev", VirtIOSCSICommon, conf.chardev),
>      DEFINE_PROP_UINT32("boot_tpgt", VirtIOSCSICommon, conf.boot_tpgt, 0),
>      DEFINE_PROP_UINT32("num_queues", VirtIOSCSICommon, conf.num_queues, 1),
> +    DEFINE_PROP_UINT32("virtqueue_size", VirtIOSCSICommon, conf.virtqueue_size,
> +                       128),
>      DEFINE_PROP_UINT32("max_sectors", VirtIOSCSICommon, conf.max_sectors,
>                         0xFFFF),
>      DEFINE_PROP_UINT32("cmd_per_lun", VirtIOSCSICommon, conf.cmd_per_lun, 128),

Looks good to me.

However I don't really know the code well enough to say if there
could be other problems.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] vhost-user-scsi: add missing virtqueue_size param
  2017-11-14 16:28 [Qemu-devel] [PATCH] vhost-user-scsi: add missing virtqueue_size param Dariusz Stojaczyk
  2017-11-14 13:18 ` Richard W.M. Jones
@ 2017-11-14 13:27 ` Paolo Bonzini
  2017-11-14 20:57 ` Michael S. Tsirkin
  2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2017-11-14 13:27 UTC (permalink / raw)
  To: Dariusz Stojaczyk, qemu-devel; +Cc: Michael S . Tsirkin, Richard W . M . Jones

On 14/11/2017 17:28, Dariusz Stojaczyk wrote:
> Commit 5c0919d0 [1] introduced virtqueue_size parameter
> for common virtio-scsi path, without updaing the vhost-user-scsi
> code. vhost-user-scsi devices right now report size 0 for each vq.
> 
> This patch introduces virtqueue_size param to vhost-user-scsi,
> that can now be set by the user. However, the most importantly, it
> now has a default value of 128 (same as QEMU's virtio-scsi).
> 
> [1] 5c0919d0 ("virtio-scsi: Add virtqueue_size parameter
> allowing virtqueue size to be set.")
> 
> Change-Id: I70e87eab702ebf1196c028dbf17d54fdc0c89a14
> Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
> ---
>  hw/scsi/vhost-user-scsi.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c
> index 500fa6a..f7561e2 100644
> --- a/hw/scsi/vhost-user-scsi.c
> +++ b/hw/scsi/vhost-user-scsi.c
> @@ -135,6 +135,8 @@ static Property vhost_user_scsi_properties[] = {
>      DEFINE_PROP_CHR("chardev", VirtIOSCSICommon, conf.chardev),
>      DEFINE_PROP_UINT32("boot_tpgt", VirtIOSCSICommon, conf.boot_tpgt, 0),
>      DEFINE_PROP_UINT32("num_queues", VirtIOSCSICommon, conf.num_queues, 1),
> +    DEFINE_PROP_UINT32("virtqueue_size", VirtIOSCSICommon, conf.virtqueue_size,
> +                       128),
>      DEFINE_PROP_UINT32("max_sectors", VirtIOSCSICommon, conf.max_sectors,
>                         0xFFFF),
>      DEFINE_PROP_UINT32("cmd_per_lun", VirtIOSCSICommon, conf.cmd_per_lun, 128),
> 

Thanks, will apply.

Paolo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH] vhost-user-scsi: add missing virtqueue_size param
@ 2017-11-14 16:28 Dariusz Stojaczyk
  2017-11-14 13:18 ` Richard W.M. Jones
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dariusz Stojaczyk @ 2017-11-14 16:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Michael S . Tsirkin, Richard W . M . Jones,
	Dariusz Stojaczyk

Commit 5c0919d0 [1] introduced virtqueue_size parameter
for common virtio-scsi path, without updaing the vhost-user-scsi
code. vhost-user-scsi devices right now report size 0 for each vq.

This patch introduces virtqueue_size param to vhost-user-scsi,
that can now be set by the user. However, the most importantly, it
now has a default value of 128 (same as QEMU's virtio-scsi).

[1] 5c0919d0 ("virtio-scsi: Add virtqueue_size parameter
allowing virtqueue size to be set.")

Change-Id: I70e87eab702ebf1196c028dbf17d54fdc0c89a14
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
---
 hw/scsi/vhost-user-scsi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c
index 500fa6a..f7561e2 100644
--- a/hw/scsi/vhost-user-scsi.c
+++ b/hw/scsi/vhost-user-scsi.c
@@ -135,6 +135,8 @@ static Property vhost_user_scsi_properties[] = {
     DEFINE_PROP_CHR("chardev", VirtIOSCSICommon, conf.chardev),
     DEFINE_PROP_UINT32("boot_tpgt", VirtIOSCSICommon, conf.boot_tpgt, 0),
     DEFINE_PROP_UINT32("num_queues", VirtIOSCSICommon, conf.num_queues, 1),
+    DEFINE_PROP_UINT32("virtqueue_size", VirtIOSCSICommon, conf.virtqueue_size,
+                       128),
     DEFINE_PROP_UINT32("max_sectors", VirtIOSCSICommon, conf.max_sectors,
                        0xFFFF),
     DEFINE_PROP_UINT32("cmd_per_lun", VirtIOSCSICommon, conf.cmd_per_lun, 128),
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] vhost-user-scsi: add missing virtqueue_size param
  2017-11-14 16:28 [Qemu-devel] [PATCH] vhost-user-scsi: add missing virtqueue_size param Dariusz Stojaczyk
  2017-11-14 13:18 ` Richard W.M. Jones
  2017-11-14 13:27 ` Paolo Bonzini
@ 2017-11-14 20:57 ` Michael S. Tsirkin
  2 siblings, 0 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2017-11-14 20:57 UTC (permalink / raw)
  To: Dariusz Stojaczyk; +Cc: qemu-devel, Paolo Bonzini, Richard W . M . Jones

On Tue, Nov 14, 2017 at 05:28:36PM +0100, Dariusz Stojaczyk wrote:
> Commit 5c0919d0 [1] introduced virtqueue_size parameter
> for common virtio-scsi path, without updaing the vhost-user-scsi
> code. vhost-user-scsi devices right now report size 0 for each vq.
> 
> This patch introduces virtqueue_size param to vhost-user-scsi,
> that can now be set by the user. However, the most importantly, it
> now has a default value of 128 (same as QEMU's virtio-scsi).
> 
> [1] 5c0919d0 ("virtio-scsi: Add virtqueue_size parameter
> allowing virtqueue size to be set.")
> 
> Change-Id: I70e87eab702ebf1196c028dbf17d54fdc0c89a14
> Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>

> ---
>  hw/scsi/vhost-user-scsi.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c
> index 500fa6a..f7561e2 100644
> --- a/hw/scsi/vhost-user-scsi.c
> +++ b/hw/scsi/vhost-user-scsi.c
> @@ -135,6 +135,8 @@ static Property vhost_user_scsi_properties[] = {
>      DEFINE_PROP_CHR("chardev", VirtIOSCSICommon, conf.chardev),
>      DEFINE_PROP_UINT32("boot_tpgt", VirtIOSCSICommon, conf.boot_tpgt, 0),
>      DEFINE_PROP_UINT32("num_queues", VirtIOSCSICommon, conf.num_queues, 1),
> +    DEFINE_PROP_UINT32("virtqueue_size", VirtIOSCSICommon, conf.virtqueue_size,
> +                       128),
>      DEFINE_PROP_UINT32("max_sectors", VirtIOSCSICommon, conf.max_sectors,
>                         0xFFFF),
>      DEFINE_PROP_UINT32("cmd_per_lun", VirtIOSCSICommon, conf.cmd_per_lun, 128),
> -- 
> 2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-14 20:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-14 16:28 [Qemu-devel] [PATCH] vhost-user-scsi: add missing virtqueue_size param Dariusz Stojaczyk
2017-11-14 13:18 ` Richard W.M. Jones
2017-11-14 13:27 ` Paolo Bonzini
2017-11-14 20:57 ` Michael S. Tsirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.