-
Notifications
You must be signed in to change notification settings - Fork 182
netkvm: add netkvm_poll_mode test case #4353
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
- netkvm_poll_mode: | ||
type = netkvm_poll_mode | ||
clone = yes | ||
backup_image_before_testing = yes | ||
restore_image_after_testing = yes | ||
# this case only tested on prewhql255 or higher version | ||
cdroms += " virtio" | ||
required_virtio_win_prewhql = [0.1.255, ) | ||
# boot with virtio-net-pci device | ||
only Win11, Win2025 | ||
only virtio_net | ||
mq = on | ||
enable_rss = '"*RSS" 1' | ||
setup_rss_queues = '"*NumRssQueues" %s' | ||
check_rss_queues = "*NumRssQueues" | ||
Comment on lines
+14
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rss_queue_name = "*NumRssQueues" Please update these lines as we discussed. |
||
check_poll_mode = "*NdisPoll" | ||
keyword = "Poll mode tried and" | ||
variants: | ||
- queue4_smp4: | ||
smp = 4 | ||
queues = ${smp} | ||
variants: | ||
- rss_16: | ||
rss_queues = 16 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rss_queue_value = 1 |
||
keyword = "${keyword} enabled" | ||
- rss_2: | ||
rss_queues = 2 | ||
keyword = "${keyword} disabled" | ||
- queue4_smp2: | ||
queues = 4 | ||
smp = 2 | ||
rss_queues = 2 | ||
keyword = "${keyword} enabled" | ||
- queue32_smp20: | ||
queues = 32 | ||
smp = 20 | ||
rss_queues = 16 | ||
keyword = "${keyword} disabled" |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,40 @@ | ||||||
import re | ||||||
|
||||||
from virttest import utils_net | ||||||
|
||||||
|
||||||
def run(test, params, env): | ||||||
""" | ||||||
Test net adapter after set NetAdapterrss, this case will: | ||||||
|
||||||
1) Boot up VM with specific smp and queues | ||||||
2) Configure RSS in VM | ||||||
3) Check ndis Poll Mode state | ||||||
4) Check traceview output | ||||||
|
||||||
:param test: QEMU test object | ||||||
:param params: Dictionary with the test parameters | ||||||
:param env: Dictionary with test environmen. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
""" | ||||||
vm = env.get_vm(params["main_vm"]) | ||||||
vm.verify_alive() | ||||||
|
||||||
# Enable RSS and setup RSS Queues value | ||||||
rss_queues = params["rss_queues"] | ||||||
rss, rss_value = params["enable_rss"].split(" ") | ||||||
rss_queues, rss_queues_value = (params["setup_rss_queues"] % rss_queues).split(" ") | ||||||
utils_net.set_netkvm_param_value(vm, rss, rss_value) | ||||||
utils_net.set_netkvm_param_value(vm, rss_queues, rss_queues_value) | ||||||
|
||||||
# Check ndis poll mode state | ||||||
output = utils_net.get_netkvm_param_value(vm, "*NdisPoll") | ||||||
test.log.info("ndis poll mode is %s", output) | ||||||
|
||||||
# Check the traceview content | ||||||
keyword = params["keyword"] | ||||||
result = utils_net.dump_traceview_log_windows(params, vm) | ||||||
test.log.info("Traceview log result: %s", result) | ||||||
mapping_output = re.findall(keyword, result) | ||||||
if not mapping_output: | ||||||
test.error("Can't get %s from traceview", keyword) | ||||||
return mapping_output | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to return any value for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we also need add virtio-win version here