bdev/virtio: Validate maximum number of queues specified in config file
Change-Id: I372565a1d3388fc5f4da79e4eb2799572144ed83 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/408531 Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
3a5452d65d
commit
a1bcc450f0
@ -1567,6 +1567,8 @@ bdev_virtio_process_config(void)
|
||||
num_queues = spdk_conf_section_get_intval(sp, "Queues");
|
||||
if (num_queues < 1) {
|
||||
num_queues = 1;
|
||||
} else if (num_queues > SPDK_VIRTIO_MAX_VIRTQUEUES) {
|
||||
num_queues = SPDK_VIRTIO_MAX_VIRTQUEUES;
|
||||
}
|
||||
|
||||
name = spdk_conf_section_get_val(sp, "Name");
|
||||
|
Loading…
Reference in New Issue
Block a user