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