Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions qemu/tests/cfg/netkvm_poll_mode.cfg
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, )
Copy link
Contributor

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

# 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
Copy link
Contributor

Choose a reason for hiding this comment

The 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
Copy link
Contributor

Choose a reason for hiding this comment

The 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"
40 changes: 40 additions & 0 deletions qemu/tests/netkvm_poll_mode.py
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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
:param env: Dictionary with test environmen.
:param env: Dictionary with test environment.

"""
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
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to return any value for run()