|
|
404507 |
From c6e5d4660e094d9377300d76873545ef73886e0a Mon Sep 17 00:00:00 2001
|
|
|
404507 |
Message-Id: <c6e5d4660e094d9377300d76873545ef73886e0a@dist-git>
|
|
|
3e5111 |
From: Martin Kletzander <mkletzan@redhat.com>
|
|
|
3e5111 |
Date: Tue, 25 Apr 2017 13:41:21 +0200
|
|
|
404507 |
Subject: [PATCH] RHEL: Define ETHTOOL_[GS]COALESCE when building on older
|
|
|
404507 |
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 |
---
|
|
|
404507 |
src/util/virnetdev.c | 23 ++++++++---------------
|
|
|
404507 |
1 file changed, 8 insertions(+), 15 deletions(-)
|
|
|
3e5111 |
|
|
|
3e5111 |
diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
|
|
|
404507 |
index 41ef65d882..4a63fe9af9 100644
|
|
|
3e5111 |
--- a/src/util/virnetdev.c
|
|
|
3e5111 |
+++ b/src/util/virnetdev.c
|
|
|
404507 |
@@ -3350,7 +3350,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
|
|
|
404507 |
@@ -3450,20 +3457,6 @@ int virNetDevSetCoalesce(const char *ifname,
|
|
|
3e5111 |
VIR_FORCE_CLOSE(fd);
|
|
|
3e5111 |
return ret;
|
|
|
3e5111 |
}
|
|
|
3e5111 |
-# else
|
|
|
3e5111 |
-int virNetDevSetCoalesce(const char *ifname,
|
|
|
404507 |
- virNetDevCoalescePtr coalesce,
|
|
|
404507 |
- bool update)
|
|
|
3e5111 |
-{
|
|
|
404507 |
- if (!coalesce && !update)
|
|
|
404507 |
- return 0;
|
|
|
404507 |
-
|
|
|
3e5111 |
- virReportSystemError(ENOSYS,
|
|
|
3e5111 |
- _("Cannot set coalesce info on interface '%s'"),
|
|
|
3e5111 |
- ifname);
|
|
|
3e5111 |
- return -1;
|
|
|
3e5111 |
-}
|
|
|
3e5111 |
-# endif
|
|
|
3e5111 |
|
|
|
3e5111 |
|
|
|
3e5111 |
/**
|
|
|
3e5111 |
--
|
|
|
404507 |
2.14.3
|
|
|
3e5111 |
|