1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-20 07:59:00 +00:00

netdev: simplify check for ethtool functionality

ethtool is a Linux specific feature that has existed since before Linux
moved to git. Checking against SIOCETHTOOL + WITH_STRUCT_IFREQ is
overkill for our needs.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2022-12-08 09:42:09 +00:00
parent 3e3b012172
commit 5d8c5bd455

View File

@ -42,6 +42,8 @@
#ifdef __linux__ #ifdef __linux__
# include <linux/sockios.h> # include <linux/sockios.h>
# include <linux/if_vlan.h> # include <linux/if_vlan.h>
# include <linux/types.h>
# include <linux/ethtool.h>
# define VIR_NETDEV_FAMILY AF_UNIX # define VIR_NETDEV_FAMILY AF_UNIX
#elif defined(WITH_STRUCT_IFREQ) && defined(AF_LOCAL) #elif defined(WITH_STRUCT_IFREQ) && defined(AF_LOCAL)
# define VIR_NETDEV_FAMILY AF_LOCAL # define VIR_NETDEV_FAMILY AF_LOCAL
@ -49,11 +51,6 @@
# undef WITH_STRUCT_IFREQ # undef WITH_STRUCT_IFREQ
#endif #endif
#if defined(SIOCETHTOOL) && defined(WITH_STRUCT_IFREQ)
# include <linux/types.h>
# include <linux/ethtool.h>
#endif
#if WITH_DECL_LINK_ADDR #if WITH_DECL_LINK_ADDR
# include <sys/sockio.h> # include <sys/sockio.h>
# include <net/if_dl.h> # include <net/if_dl.h>
@ -2958,7 +2955,7 @@ int virNetDevGetRxFilter(const char *ifname,
return ret; return ret;
} }
#if defined(SIOCETHTOOL) && defined(WITH_STRUCT_IFREQ) #if __linux__
/** /**
* virNetDevRDMAFeature * virNetDevRDMAFeature