diff --git a/libvirt/tests/cfg/virtual_network/mtu.cfg b/libvirt/tests/cfg/virtual_network/mtu.cfg index bb6635cca7..c55f088100 100644 --- a/libvirt/tests/cfg/virtual_network/mtu.cfg +++ b/libvirt/tests/cfg/virtual_network/mtu.cfg @@ -43,7 +43,7 @@ - tap: create_tap = yes tap_mtu_size = 2000 - tap_cmd = 'ip tuntap add mode tap name {tap_name};ip link set dev {tap_name} mtu ${tap_mtu_size}' + tap_cmd = 'ip tuntap add mode tap name {tap_name} multi_queue;ip link set dev {tap_name} mtu ${tap_mtu_size}' variants: - managed_no: iface_target = {'dev': '%s', 'managed': 'no'} diff --git a/libvirt/tests/src/virtual_network/mtu.py b/libvirt/tests/src/virtual_network/mtu.py index ab3a11659a..ffa9d020a8 100644 --- a/libvirt/tests/src/virtual_network/mtu.py +++ b/libvirt/tests/src/virtual_network/mtu.py @@ -209,6 +209,10 @@ def check_mtu_in_vm(fn_login, mtu_size, timeout): if tap_cmd is None: test.error('No tap creating command provided.') tap_cmd = tap_cmd.format(tap_name=tap_name) + vmxml = vm_xml.VMXML.new_from_dumpxml(vm_name) + iface = vmxml.devices.by_device_tag('interface')[0] + if "driver queues" not in str(iface): + tap_cmd = tap_cmd.replace(' multi_queue', '') logging.debug('Tap creating command: \n %s', tap_cmd) # Create tap device process.run(tap_cmd, verbose=True, shell=True) @@ -231,8 +235,6 @@ def check_mtu_in_vm(fn_login, mtu_size, timeout): test.fail('Host mtu size check FAIL.') # Get iface mac address - vmxml = vm_xml.VMXML.new_from_dumpxml(vm_name) - iface = vmxml.devices.by_device_tag('interface')[0] iface_mac = iface.mac_address # Check mtu inside vm @@ -386,4 +388,7 @@ def check_mtu_in_vm(fn_login, mtu_size, timeout): process.run("ovs-vsctl del-br %s" % br, verbose=True) utils_package.package_remove(add_pkg) if create_tap: - process.run('ip tuntap del mode tap {}'.format(tap_name), verbose=True, shell=True) + tap_del_cmd = 'ip tuntap del mode tap {} multi_queue' + if "multi_queue" not in tap_cmd: + tap_del_cmd = tap_del_cmd.replace(' multi_queue', '') + process.run(tap_del_cmd.format(tap_name), verbose=True, shell=True)