vhost/blk: set blkcfg->num_queues to the max available queues number
QEMU overrides this value anyway, but other virtio implementation may not. Setting blkcfg->num_queues to its target value won't break anything, and will help out SPDK virtio-blk driver implementation. For equivalent field in virtio-scsi, the Virtio 1.0 spec says: ``` num_queues is the total number of request virtqueues exposed by the device. The driver MAY use only one request queue, or it can use more to achieve better performance. ``` Multiqueue for virtio-blk is oficially still unsupported, so the blkcfg->num_queues remains undocumented. Let's implement it adequately to the virtio-scsi spec. Change-Id: Ief520385997bb7e745ed17501a972c55955346d2 Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/399121 Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
1c164f117d
commit
8f29093660
@ -649,7 +649,7 @@ spdk_vhost_blk_get_config(struct spdk_vhost_dev *vdev, uint8_t *config,
|
||||
/* -2 for REQ and RESP and -1 for region boundary splitting */
|
||||
blkcfg->seg_max = SPDK_VHOST_IOVS_MAX - 2 - 1;
|
||||
/* QEMU can overwrite this value when started */
|
||||
blkcfg->num_queues = 1;
|
||||
blkcfg->num_queues = SPDK_VHOST_MAX_VQUEUES;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user