[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xl: fix vNUMA vdistance parsing



commit 649f0eb7f4b8eb0d5918462e537bc3186f6d52cf
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Mon Aug 17 19:56:59 2015 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Fri Aug 21 08:45:55 2015 +0100

    xl: fix vNUMA vdistance parsing
    
    We should parse the output from splitting function, not the original
    string, otherwise the parsed result is wrong.
    
    For example:
    
    vnuma = [ [...,"vdistance=10,20",...],
              [...,"vdistance=20,10",...] ]
    
    Before this change, vdistance from node 0 to all nodes (including
    itself) was 10 and vdistance from node 1 to all nodes was 20.
    
    After this change, vdistance from node 0 to itself is 10, to node 1 is
    20 and vdistance from node 1 to node 0 is 20, to itself is 10. That's
    the correct vdistance settings we expect.
    
    Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Reviewed-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 tools/libxl/xl_cmdimpl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index c6b0b68..44fff82 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -1188,7 +1188,7 @@ static void parse_vnuma_config(const XLU_Config *config,
                     len = libxl_string_list_length(&vdist);
 
                     for (j = 0; j < len; j++) {
-                        val = parse_ulong(value);
+                        val = parse_ulong(vdist[j]);
                         p->distances[j] = val;
                     }
                     libxl_string_list_dispose(&vdist);
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.