|
|
c1c534 |
From f8604e5cb29526fa7374b1a6690ac3b285720c3f Mon Sep 17 00:00:00 2001
|
|
|
c1c534 |
Message-Id: <f8604e5cb29526fa7374b1a6690ac3b285720c3f@dist-git>
|
|
|
c1c534 |
From: Martin Kletzander <mkletzan@redhat.com>
|
|
|
c1c534 |
Date: Wed, 31 Jan 2018 16:32:24 +0100
|
|
|
c1c534 |
Subject: [PATCH] Rename virResctrlInfo to virResctrlInfoPerCache
|
|
|
c1c534 |
|
|
|
c1c534 |
https://bugzilla.redhat.com/show_bug.cgi?id=1289368
|
|
|
c1c534 |
|
|
|
c1c534 |
Just to ease the review of following patches.
|
|
|
c1c534 |
|
|
|
c1c534 |
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
c1c534 |
(cherry picked from commit b2211a9e5492879be5f3c6ab9ed2d0dba849c964)
|
|
|
c1c534 |
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
c1c534 |
---
|
|
|
c1c534 |
src/conf/capabilities.c | 2 +-
|
|
|
c1c534 |
src/conf/capabilities.h | 2 +-
|
|
|
c1c534 |
src/util/virresctrl.c | 4 ++--
|
|
|
c1c534 |
src/util/virresctrl.h | 8 ++++----
|
|
|
c1c534 |
4 files changed, 8 insertions(+), 8 deletions(-)
|
|
|
c1c534 |
|
|
|
c1c534 |
diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c
|
|
|
c1c534 |
index 798c9bdaea..e93eaed2f0 100644
|
|
|
c1c534 |
--- a/src/conf/capabilities.c
|
|
|
c1c534 |
+++ b/src/conf/capabilities.c
|
|
|
c1c534 |
@@ -904,7 +904,7 @@ virCapabilitiesFormatCaches(virBufferPtr buf,
|
|
|
c1c534 |
virBufferSetChildIndent(&controlBuf, buf);
|
|
|
c1c534 |
for (j = 0; j < bank->ncontrols; j++) {
|
|
|
c1c534 |
const char *min_unit;
|
|
|
c1c534 |
- virResctrlInfoPtr controls = bank->controls[j];
|
|
|
c1c534 |
+ virResctrlInfoPerCachePtr controls = bank->controls[j];
|
|
|
c1c534 |
unsigned long long gran_short_size = controls->granularity;
|
|
|
c1c534 |
unsigned long long min_short_size = controls->min;
|
|
|
c1c534 |
|
|
|
c1c534 |
diff --git a/src/conf/capabilities.h b/src/conf/capabilities.h
|
|
|
c1c534 |
index 5048fa819d..27b88cb5ed 100644
|
|
|
c1c534 |
--- a/src/conf/capabilities.h
|
|
|
c1c534 |
+++ b/src/conf/capabilities.h
|
|
|
c1c534 |
@@ -148,7 +148,7 @@ struct _virCapsHostCacheBank {
|
|
|
c1c534 |
virCacheType type; /* Data, Instruction or Unified */
|
|
|
c1c534 |
virBitmapPtr cpus; /* All CPUs that share this bank */
|
|
|
c1c534 |
size_t ncontrols;
|
|
|
c1c534 |
- virResctrlInfoPtr *controls;
|
|
|
c1c534 |
+ virResctrlInfoPerCachePtr *controls;
|
|
|
c1c534 |
};
|
|
|
c1c534 |
|
|
|
c1c534 |
typedef struct _virCapsHost virCapsHost;
|
|
|
c1c534 |
diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c
|
|
|
c1c534 |
index 2a11825a52..050a08178e 100644
|
|
|
c1c534 |
--- a/src/util/virresctrl.c
|
|
|
c1c534 |
+++ b/src/util/virresctrl.c
|
|
|
c1c534 |
@@ -59,7 +59,7 @@ int
|
|
|
c1c534 |
virResctrlGetCacheInfo(unsigned int level,
|
|
|
c1c534 |
unsigned long long size,
|
|
|
c1c534 |
virCacheType scope,
|
|
|
c1c534 |
- virResctrlInfoPtr **controls,
|
|
|
c1c534 |
+ virResctrlInfoPerCachePtr **controls,
|
|
|
c1c534 |
size_t *ncontrols)
|
|
|
c1c534 |
{
|
|
|
c1c534 |
int ret = -1;
|
|
|
c1c534 |
@@ -69,7 +69,7 @@ virResctrlGetCacheInfo(unsigned int level,
|
|
|
c1c534 |
char *type_upper = NULL;
|
|
|
c1c534 |
unsigned int bits = 0;
|
|
|
c1c534 |
unsigned int min_cbm_bits = 0;
|
|
|
c1c534 |
- virResctrlInfoPtr control;
|
|
|
c1c534 |
+ virResctrlInfoPerCachePtr control;
|
|
|
c1c534 |
|
|
|
c1c534 |
if (VIR_ALLOC(control) < 0)
|
|
|
c1c534 |
goto cleanup;
|
|
|
c1c534 |
diff --git a/src/util/virresctrl.h b/src/util/virresctrl.h
|
|
|
c1c534 |
index 848b13e98a..42e8527803 100644
|
|
|
c1c534 |
--- a/src/util/virresctrl.h
|
|
|
c1c534 |
+++ b/src/util/virresctrl.h
|
|
|
c1c534 |
@@ -36,9 +36,9 @@ typedef enum {
|
|
|
c1c534 |
VIR_ENUM_DECL(virCache);
|
|
|
c1c534 |
|
|
|
c1c534 |
|
|
|
c1c534 |
-typedef struct _virResctrlInfo virResctrlInfo;
|
|
|
c1c534 |
-typedef virResctrlInfo *virResctrlInfoPtr;
|
|
|
c1c534 |
-struct _virResctrlInfo {
|
|
|
c1c534 |
+typedef struct _virResctrlInfoPerCache virResctrlInfoPerCache;
|
|
|
c1c534 |
+typedef virResctrlInfoPerCache *virResctrlInfoPerCachePtr;
|
|
|
c1c534 |
+struct _virResctrlInfoPerCache {
|
|
|
c1c534 |
/* Smallest possible increase of the allocation size in bytes */
|
|
|
c1c534 |
unsigned long long granularity;
|
|
|
c1c534 |
/* Minimal allocatable size in bytes (if different from granularity) */
|
|
|
c1c534 |
@@ -54,7 +54,7 @@ int
|
|
|
c1c534 |
virResctrlGetCacheInfo(unsigned int level,
|
|
|
c1c534 |
unsigned long long size,
|
|
|
c1c534 |
virCacheType scope,
|
|
|
c1c534 |
- virResctrlInfoPtr **controls,
|
|
|
c1c534 |
+ virResctrlInfoPerCachePtr **controls,
|
|
|
c1c534 |
size_t *ncontrols);
|
|
|
c1c534 |
|
|
|
c1c534 |
int
|
|
|
c1c534 |
--
|
|
|
c1c534 |
2.16.1
|
|
|
c1c534 |
|