Skip to content

Commit

Permalink
num_queues: correct num-queues to accept int value
Browse files Browse the repository at this point in the history
According to the latest upstream qemu, argument num-queues only
accepts uint64 value.

Signed-off-by: ybduan <[email protected]>
  • Loading branch information
ybduan committed Jan 9, 2025
1 parent 25a214d commit 2978077
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions virttest/qemu_devices/qcontainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2214,7 +2214,7 @@ def define_hbas(
_bus_name = bus_name.rsplit(".")[0]
bus_params = {"id": _bus_name, "driver": atype}
if num_queues is not None and int(num_queues) > 1:
bus_params["num_queues"] = num_queues
bus_params["num_queues"] = int(num_queues)
if bus_extra_params:
for extra_param in bus_extra_params.split(","):
key, value = extra_param.split("=")
Expand Down Expand Up @@ -2921,7 +2921,7 @@ def define_hbas(
devices[-1].set_param(key, value)
if self.is_dev_iothread_vq_supported(devices[-1]):
if num_queues:
devices[-1].set_param("num-queues", num_queues)
devices[-1].set_param("num-queues", int(num_queues))
# add iothread-vq-mapping if available
if image_iothread_vq_mapping:
val = []
Expand Down

0 comments on commit 2978077

Please sign in to comment.