]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virNetDevTapCreate: Use error message hinting to multiqueue use only when opening...
authorPeter Krempa <pkrempa@redhat.com>
Tue, 13 May 2025 11:44:27 +0000 (13:44 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 15 May 2025 06:30:42 +0000 (08:30 +0200)
Due to a logic bug the error message mentioning multi queue operation
would be emitted also when a single queue would be opened on an
externally managed tap device.

Adjust the condition to trigger only when multiple queues are in use.

Fixes: f6fb097e11a
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/util/virnetdevtap.c

index f26afb2ce0bfd2444020fec1196f56f8b33dea8f..b709d76cc724cdd4850b3f0c1e10b878f1f22a8f 100644 (file)
@@ -231,7 +231,7 @@ int virNetDevTapCreate(char **ifname,
 
         if (ioctl(fd, TUNSETIFF, &ifr) < 0) {
             if (flags & VIR_NETDEV_TAP_CREATE_ALLOW_EXISTING &&
-                tapfdSize > 0) {
+                tapfdSize > 1) {
                 virReportSystemError(errno,
                                      _("Unable to create multiple fds for tap device %1$s (maybe existing device was created without multi_queue flag)"),
                                      *ifname);