On 11.03.2015 15:27, Pavel Hrdina wrote: > Commit c9027d8f added a detection of NIC HW features, but some of them > are not available in old kernel. Very old kernels lack enum > ethtool_flags and even if this enum is present, not all values are > available for all kernels. To be sure that we have everything in kernel > that we need, we must check for existence of most of that flags, because > only few of them were defined at first. > > Also to successfully build libvirt with older kernel we need to include > <linux/types.h> before <linux/ethtool.h> to have __u32 and friends > defined. > > Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> > --- > configure.ac | 5 +++++ > src/util/virnetdev.c | 43 +++++++++++++++++++++++++++---------------- > 2 files changed, 32 insertions(+), 16 deletions(-) > > diff --git a/configure.ac b/configure.ac > index e071813..2fedd1a 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -383,6 +383,11 @@ AC_CHECK_TYPE([struct ifreq], > #include <net/if.h> > ]]) > > +AC_CHECK_DECLS([ETH_FLAG_TXVLAN, ETH_FLAG_NTUPLE, ETH_FLAG_RXHASH, ETH_FLAG_LRO, > + ETHTOOL_GGSO, ETHTOOL_GGRO, ETHTOOL_GFLAGS], > + [], [], [[#include <linux/ethtool.h> > + ]]) > + GSO and GRO were added in the same commit 37c3185a. So one of these checks can be dropped. ACK with that fixed. Michal -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list