From: Peter Krempa Date: Tue, 13 May 2025 11:44:27 +0000 (+0200) Subject: virNetDevTapCreate: Use error message hinting to multiqueue use only when opening... X-Git-Tag: v11.4.0-rc1~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=465a38154f0cfc31d62c4105770e1f4a9599a611;p=thirdparty%2Flibvirt.git virNetDevTapCreate: Use error message hinting to multiqueue use only when opening multiple queues 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 Reviewed-by: Daniel P. Berrangé --- diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c index f26afb2ce0..b709d76cc7 100644 --- a/src/util/virnetdevtap.c +++ b/src/util/virnetdevtap.c @@ -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);