Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add missing conversion for "sndbuf" and other options for QNetdev #3794

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

PaulYuuu
Copy link
Contributor

The "sndbuf" option of -netdev, it requires size type, so if we assign a size like "1M", QNetdev should able to convert it to "1048576". On the other hand, in the first version, converting string to numeric was missing, so adding it as well this time.

ID: 1527

@PaulYuuu
Copy link
Contributor Author

Hello @YongxueHong @yanglei-rh, please help to review, thanks.

For all options type, you can check https://gitlab.com/qemu-project/qemu/-/blob/master/qapi/net.json

virttest/qemu_devices/qdevices.py Show resolved Hide resolved
virttest/qemu_devices/qdevices.py Outdated Show resolved Hide resolved
@yanglei-rh
Copy link
Contributor

Test Pass:
(1/5) Host_RHEL.m9.u4.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win2022.x86_64.io-github-autotest-qemu.virtual_nic.send_buffer.zero_buf.q35: PASS (279.85 s)
(2/5) Host_RHEL.m9.u4.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win2022.x86_64.io-github-autotest-qemu.virtual_nic.send_buffer.opt_buf.q35: PASS (285.59 s)
(3/5) Host_RHEL.m9.u4.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win2022.x86_64.io-github-autotest-qemu.virtual_nic.send_buffer.default_buf.q35: PASS (277.54 s)
(4/5) Host_RHEL.m9.u4.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win2022.x86_64.io-github-autotest-qemu.nic_opt.opt_test_ping.poll-us.opt_30.q35: PASS (269.89 s)
(5/5) Host_RHEL.m9.u4.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win2022.x86_64.io-github-autotest-qemu.nic_opt.opt_test_ping.poll-us.opt_50.q35: PASS (270.37 s)

The "sndbuf" option of `-netdev`, it requires size type, so if we assign
a size like "1M", QNetdev should able to convert it to "1048576". On the
other hand, in the first version, convert string to numeric was missing,
so adding it as well.

Signed-off-by: Yihuang Yu <[email protected]>
Copy link
Contributor

@YongxueHong YongxueHong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@YongxueHong YongxueHong merged commit d61b099 into avocado-framework:master Nov 15, 2023
49 checks passed
@PaulYuuu PaulYuuu deleted the netdev-json-type branch November 21, 2023 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants