]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: remove compile time tests for IFF_VNET_HDR/IFF_MULTI_QUEUE
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 24 Sep 2020 11:12:37 +0000 (12:12 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 1 Oct 2020 14:16:24 +0000 (15:16 +0100)
The former has been present since

  commit f43798c27684ab925adde7d8acc34c78c6e50df8
  Author: Rusty Russell <rusty@rustcorp.com.au>
  Date:   Thu Jul 3 03:48:02 2008 -0700

    tun: Allow GSO using virtio_net_hdr

and the latter since

  commit bbb009941efaece3898910a862f6d23aa55d6ba8
  Author: Jason Wang <jasowang@redhat.com>
  Date:   Wed Oct 31 19:45:59 2012 +0000

    tuntap: introduce multiqueue flags

these are old enough that they can be assumed present in all Linux
platforms we support. The tap device creation code changed is specific
to Linux, with a separate impl for non-Linux platforms.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/util/virnetdevmacvlan.c
src/util/virnetdevtap.c

index 143e1ab98cddb910de67a55f00392df8e5de97cc..c2bcd6d22418ea1424672cb14111ad1c7c31a229 100644 (file)
@@ -380,18 +380,10 @@ virNetDevMacVLanTapSetup(int *tapfd, size_t tapfdSize, bool vnet_hdr)
             new_flags &= ~IFF_VNET_HDR;
         }
 
-# ifdef IFF_MULTI_QUEUE
         if (tapfdSize > 1)
             new_flags |= IFF_MULTI_QUEUE;
         else
             new_flags &= ~IFF_MULTI_QUEUE;
-# else
-        if (tapfdSize > 1) {
-            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                           _("Multiqueue devices are not supported on this system"));
-            return -1;
-        }
-# endif
 
         if (new_flags != ifreq.ifr_flags) {
             ifreq.ifr_flags = new_flags;
index 77c4d1c52c1b80ecdc2cc810bc8bb1b4c770842e..1738f48a5f71cb06054ef60770e22494cf5605b4 100644 (file)
@@ -292,20 +292,11 @@ int virNetDevTapCreate(char **ifname,
 
         ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
         /* If tapfdSize is greater than one, request multiqueue */
-        if (tapfdSize > 1) {
-# ifdef IFF_MULTI_QUEUE
+        if (tapfdSize > 1)
             ifr.ifr_flags |= IFF_MULTI_QUEUE;
-# else
-            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                           _("Multiqueue devices are not supported on this system"));
-            goto cleanup;
-# endif
-        }
 
-# ifdef IFF_VNET_HDR
         if (flags &  VIR_NETDEV_TAP_CREATE_VNET_HDR)
             ifr.ifr_flags |= IFF_VNET_HDR;
-# endif
 
         if (virStrcpyStatic(ifr.ifr_name, *ifname) < 0) {
             virReportSystemError(ERANGE,