]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: remove obsolete check for DEVLINK_CMD_ESWITCH_GET
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 8 Dec 2022 09:45:20 +0000 (09:45 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 12 Dec 2022 10:36:10 +0000 (10:36 +0000)
The DEVLINK_CMD_ESWITCH_GET constant was introduced to Linux in

  commit adf200f31c000d707e4afe238ed1d1199e0cce7c
  Author: Jiri Pirko <jiri@mellanox.com>
  Date:   Thu Feb 9 15:54:33 2017 +0100

    devlink: fix the name of eswitch commands

This is old enough that all our supported platforms can be assumed
to have this feature.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
meson.build
src/util/virnetdev.c

index 79f9d47520efb8015de148d17945550b4a594c6b..30dd797ee5c8fe4eb12dc1c247c90ec187756723 100644 (file)
@@ -613,11 +613,6 @@ headers = [
   'xlocale.h',
 ]
 
-if host_machine.system() == 'linux'
-  # check for DEVLINK_CMD_ESWITCH_GET
-  headers += 'linux/devlink.h'
-endif
-
 if host_machine.system() == 'freebsd'
   headers += 'libutil.h'
 endif
@@ -652,12 +647,6 @@ symbols = [
 
 if host_machine.system() == 'linux'
   symbols += [
-    # check for DEVLINK_CMD_ESWITCH_GET
-    # Assume DEVLINK_ESWITCH_MODE_SWITCHDEV is also available, as it was
-    # introudced in kernel 4.8 along with the original spelling of this
-    # constant (DEVLINK_CMD_ESWITCH_MODE_GET, not supported by libvirt).
-    [ 'linux/devlink.h', 'DEVLINK_CMD_ESWITCH_GET' ],
-
     # check for VHOST_VSOCK_SET_GUEST_CID
     [ 'linux/vhost.h', 'VHOST_VSOCK_SET_GUEST_CID' ],
 
index e0a1eb54e5a8e3928da6964a4c171ebfcb790de8..62d8162e03b63f721be3a3a16cec39c43045162f 100644 (file)
@@ -44,6 +44,7 @@
 # include <linux/if_vlan.h>
 # include <linux/types.h>
 # include <linux/ethtool.h>
+# include <linux/devlink.h>
 # define VIR_NETDEV_FAMILY AF_UNIX
 #elif defined(WITH_STRUCT_IFREQ) && defined(AF_LOCAL)
 # define VIR_NETDEV_FAMILY AF_LOCAL
@@ -56,9 +57,6 @@
 # include <net/if_dl.h>
 #endif
 
-#if WITH_LINUX_DEVLINK_H
-# include <linux/devlink.h>
-#endif
 
 #ifndef IFNAMSIZ
 # define IFNAMSIZ 16
@@ -3112,7 +3110,7 @@ virNetDevGetEthtoolFeatures(const char *ifname,
 }
 
 
-# if defined(WITH_LIBNL) && WITH_DECL_DEVLINK_CMD_ESWITCH_GET
+# if defined(WITH_LIBNL)
 
 /**
  * virNetDevGetFamilyId: