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

mtu: create tap with multi_queue flag #6085

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion libvirt/tests/cfg/virtual_network/mtu.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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'}
Expand Down
11 changes: 8 additions & 3 deletions libvirt/tests/src/virtual_network/mtu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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)