On Thu, May 20, 2021 at 17:24:53 +0200, Michal Privoznik wrote:
The virCapsHostNUMACellSiblingInfo structure really represents
distance to other NUMA node. Rename the structure and variables
of that type to make it more obvious.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/conf/capabilities.c | 52 +++++++++++++++++-----------------
src/conf/capabilities.h | 10 +++----
src/conf/virconftypes.h | 2 +-
src/libxl/libxl_capabilities.c | 20 ++++++-------
4 files changed, 42 insertions(+), 42 deletions(-)
[...]
I first wanted to complain that we might want to add other data related
to NUMA siblings other than distances ...
@@ -833,13 +833,13 @@ virCapabilitiesHostNUMAFormat(virBuffer *buf,
cell->pageinfo[j].avail);
}
- if (cell->nsiblings) {
+ if (cell->ndistances) {
virBufferAddLit(buf, "<distances>\n");
... but this clearly nests this as 'distances' so adding anything here
would seem wrong.
virBufferAdjustIndent(buf, 2);
- for (j = 0; j < cell->nsiblings; j++) {
+ for (j = 0; j < cell->ndistances; j++) {
virBufferAsprintf(buf, "<sibling id='%d'
value='%d'/>\n",
- cell->siblings[j].node,
- cell->siblings[j].distance);
+ cell->distances[j].node,
+ cell->distances[j].distance);
}
virBufferAdjustIndent(buf, -2);
virBufferAddLit(buf, "</distances>\n");
Reviewed-by: Peter Krempa <pkrempa(a)redhat.com>