From e9eb2c5dbcb3ea7b8a958ddacfed1bd35b6c1954 Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Fri, 21 Jan 2022 10:10:18 +0100 Subject: [PATCH] tests: Update macvtap integration tests with multiqueue Now that multiple file descriptors can be provided along with add-net, that means we can hotplug a multiqueue macvtap interface to the VM. The common macvtap test is updated, meaning that both coldplug and hotplug codepath now use multiqueue. Signed-off-by: Sebastien Boeuf --- tests/integration.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/integration.rs b/tests/integration.rs index 084a0dfe3..bcb8a3547 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -5993,8 +5993,10 @@ mod parallel { ); let cstr_tap_device = std::ffi::CString::new(tap_device).unwrap(); - let tap_fd = unsafe { libc::open(cstr_tap_device.as_ptr(), libc::O_RDWR) }; - assert!(tap_fd > 0); + let tap_fd1 = unsafe { libc::open(cstr_tap_device.as_ptr(), libc::O_RDWR) }; + assert!(tap_fd1 > 0); + let tap_fd2 = unsafe { libc::open(cstr_tap_device.as_ptr(), libc::O_RDWR) }; + assert!(tap_fd2 > 0); // Create a macvtap on the same physical net interface for // the host machine to use @@ -6017,14 +6019,17 @@ mod parallel { let mut guest_command = GuestCommand::new(&guest); guest_command - .args(&["--cpus", "boot=1"]) + .args(&["--cpus", "boot=2"]) .args(&["--memory", "size=512M"]) .args(&["--kernel", kernel_path.to_str().unwrap()]) .args(&["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE]) .default_disks() .args(&["--api-socket", &api_socket]); - let net_params = format!("fd={},mac={}", tap_fd, guest.network.guest_mac); + let net_params = format!( + "fd=[{},{}],mac={},num_queues=4", + tap_fd1, tap_fd2, guest.network.guest_mac + ); if !hotplug { guest_command.args(&["--net", &net_params]);