|
|
3e5111 |
From f15202cb5a7429a2618cd4ede95064d8874b64ff Mon Sep 17 00:00:00 2001
|
|
|
3e5111 |
Message-Id: <f15202cb5a7429a2618cd4ede95064d8874b64ff@dist-git>
|
|
|
3e5111 |
From: Martin Kletzander <mkletzan@redhat.com>
|
|
|
3e5111 |
Date: Tue, 25 Apr 2017 13:41:21 +0200
|
|
|
3e5111 |
Subject: [PATCH] Define ETHTOOL_[GS]COALESCE when building on older kernels
|
|
|
3e5111 |
|
|
|
3e5111 |
https://bugzilla.redhat.com/show_bug.cgi?id=1414627
|
|
|
3e5111 |
|
|
|
3e5111 |
RHEL-only (upstream will have this only when built on kernel that
|
|
|
3e5111 |
supports it).
|
|
|
3e5111 |
|
|
|
3e5111 |
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
3e5111 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
3e5111 |
---
|
|
|
3e5111 |
src/util/virnetdev.c | 19 ++++++++-----------
|
|
|
3e5111 |
1 file changed, 8 insertions(+), 11 deletions(-)
|
|
|
3e5111 |
|
|
|
3e5111 |
diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
|
|
|
3e5111 |
index f14286f62..eb97b705e 100644
|
|
|
3e5111 |
--- a/src/util/virnetdev.c
|
|
|
3e5111 |
+++ b/src/util/virnetdev.c
|
|
|
3e5111 |
@@ -3082,7 +3082,14 @@ virNetDevGetEthtoolGFeatures(virBitmapPtr bitmap ATTRIBUTE_UNUSED,
|
|
|
3e5111 |
# endif
|
|
|
3e5111 |
|
|
|
3e5111 |
|
|
|
3e5111 |
-# if HAVE_DECL_ETHTOOL_SCOALESCE && HAVE_DECL_ETHTOOL_GCOALESCE
|
|
|
3e5111 |
+/* Workaround for binary distributions building on old kernels */
|
|
|
3e5111 |
+# ifndef ETHTOOL_GCOALESCE
|
|
|
3e5111 |
+# define ETHTOOL_GCOALESCE 0x0000000e
|
|
|
3e5111 |
+# endif
|
|
|
3e5111 |
+# ifndef ETHTOOL_SCOALESCE
|
|
|
3e5111 |
+# define ETHTOOL_SCOALESCE 0x0000000f
|
|
|
3e5111 |
+# endif
|
|
|
3e5111 |
+
|
|
|
3e5111 |
/**
|
|
|
3e5111 |
* virNetDevSetCoalesce:
|
|
|
3e5111 |
* @ifname: interface name to modify
|
|
|
3e5111 |
@@ -3153,16 +3160,6 @@ int virNetDevSetCoalesce(const char *ifname,
|
|
|
3e5111 |
VIR_FORCE_CLOSE(fd);
|
|
|
3e5111 |
return ret;
|
|
|
3e5111 |
}
|
|
|
3e5111 |
-# else
|
|
|
3e5111 |
-int virNetDevSetCoalesce(const char *ifname,
|
|
|
3e5111 |
- virNetDevCoalescePtr coalesce ATTRIBUTE_UNUSED)
|
|
|
3e5111 |
-{
|
|
|
3e5111 |
- virReportSystemError(ENOSYS,
|
|
|
3e5111 |
- _("Cannot set coalesce info on interface '%s'"),
|
|
|
3e5111 |
- ifname);
|
|
|
3e5111 |
- return -1;
|
|
|
3e5111 |
-}
|
|
|
3e5111 |
-# endif
|
|
|
3e5111 |
|
|
|
3e5111 |
|
|
|
3e5111 |
/**
|
|
|
3e5111 |
--
|
|
|
3e5111 |
2.12.2
|
|
|
3e5111 |
|