The ETHTOOL_GFLAGS constant was introduced to Linux in
commit 3ae7c0b2e3747b50c3a6c63ebb67469e0a6b3203
Author: Jeff Garzik <jeff(a)garzik.org>
Date: Wed Aug 15 16:00:51 2007 -0700
[ETHTOOL]: Add ETHTOOL_[GS]FLAGS sub-ioctls
This is old enough that all our supported platforms can be assumed
to have this feature.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
meson.build | 1 -
src/util/virnetdev.c | 20 ++++++++------------
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/meson.build b/meson.build
index be5d356b88..4703b2c670 100644
--- a/meson.build
+++ b/meson.build
@@ -654,7 +654,6 @@ symbols = [
[ 'linux/ethtool.h', 'ETH_FLAG_NTUPLE' ],
[ 'linux/ethtool.h', 'ETH_FLAG_RXHASH' ],
[ 'linux/ethtool.h', 'ETH_FLAG_LRO' ],
- [ 'linux/ethtool.h', 'ETHTOOL_GFLAGS' ],
[ 'linux/ethtool.h', 'ETHTOOL_GFEATURES' ],
[ 'linux/ethtool.h', 'ETHTOOL_SCOALESCE' ],
[ 'linux/ethtool.h', 'ETHTOOL_GCOALESCE' ],
diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
index bf7393b476..f6e2b06102 100644
--- a/src/util/virnetdev.c
+++ b/src/util/virnetdev.c
@@ -3087,24 +3087,22 @@ virNetDevGetEthtoolFeatures(const char *ifname,
{ETHTOOL_GGRO, VIR_NET_DEV_FEAT_GGRO},
};
-# if WITH_DECL_ETHTOOL_GFLAGS
/* ethtool masks */
struct virNetDevEthtoolFeatureCmd flags[] = {
-# if WITH_DECL_ETH_FLAG_LRO
+# if WITH_DECL_ETH_FLAG_LRO
{ETH_FLAG_LRO, VIR_NET_DEV_FEAT_LRO},
-# endif
-# if WITH_DECL_ETH_FLAG_TXVLAN
+# endif
+# if WITH_DECL_ETH_FLAG_TXVLAN
{ETH_FLAG_RXVLAN, VIR_NET_DEV_FEAT_RXVLAN},
{ETH_FLAG_TXVLAN, VIR_NET_DEV_FEAT_TXVLAN},
-# endif
-# if WITH_DECL_ETH_FLAG_NTUBLE
+# endif
+# if WITH_DECL_ETH_FLAG_NTUBLE
{ETH_FLAG_NTUPLE, VIR_NET_DEV_FEAT_NTUPLE},
-# endif
-# if WITH_DECL_ETH_FLAG_RXHASH
+# endif
+# if WITH_DECL_ETH_FLAG_RXHASH
{ETH_FLAG_RXHASH, VIR_NET_DEV_FEAT_RXHASH},
-# endif
- };
# endif
+ };
for (i = 0; i < G_N_ELEMENTS(ethtool_cmds); i++) {
cmd.cmd = ethtool_cmds[i].cmd;
@@ -3112,7 +3110,6 @@ virNetDevGetEthtoolFeatures(const char *ifname,
ignore_value(virBitmapSetBit(bitmap, ethtool_cmds[i].feat));
}
-# if WITH_DECL_ETHTOOL_GFLAGS
cmd.cmd = ETHTOOL_GFLAGS;
if (virNetDevFeatureAvailable(ifname, fd, ifr, &cmd)) {
for (i = 0; i < G_N_ELEMENTS(flags); i++) {
@@ -3120,7 +3117,6 @@ virNetDevGetEthtoolFeatures(const char *ifname,
ignore_value(virBitmapSetBit(bitmap, flags[i].feat));
}
}
-# endif
}
--
2.38.1