this patchset contains API fixes and cleanup on the XL library. removing the number of exposed API to the client, and simplify the API where possible. Vincent Hanquez (11): change semantics of ctx_free and remove ctx_close coding styles cleanup remove useless smac in the nic_info structure remove structure init from the library and structure domid fixup completly hide internal logging from client remove waitpid wrapper that''s doesn''t do anything add useful xc flags in the xl_dominfo structure remove API for dominfolist and list that returns xc_dominfo. add a get_shutdown_reason define errors as an enum instead of define random values. add a versioning number to ctx_init that permit to detect incompatible client. tools/libxl/libxl.c | 354 +++++++++-------------------------------- tools/libxl/libxl.h | 59 ++------ tools/libxl/libxl_device.c | 6 +- tools/libxl/libxl_dom.c | 60 ++++++-- tools/libxl/libxl_exec.c | 59 ++++---- tools/libxl/libxl_internal.h | 28 +++- tools/libxl/xl.c | 198 +++++++++++++++++++----- 7 files changed, 355 insertions(+), 409 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vincent Hanquez
2009-Dec-29 18:06 UTC
[Xen-devel] [PATCH 01/11] change semantics of ctx_free and remove ctx_close
ctx_close isn''t use anywhere, and free reallocate the GC array, which is quite surprising and lead to memory leaking in xl.c Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- tools/libxl/libxl.c | 10 ---------- tools/libxl/libxl.h | 1 - 2 files changed, 0 insertions(+), 11 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
simplify some lines, and keep the xl style consistant with itself. use libxl_sprintf instead of snprintf/sprintf Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- tools/libxl/libxl.c | 94 +++++++++++++++++++----------------------- tools/libxl/libxl_device.c | 6 +- tools/libxl/libxl_dom.c | 25 ++++++++++- tools/libxl/libxl_exec.c | 47 +++++++++++---------- tools/libxl/libxl_internal.h | 2 +- 5 files changed, 95 insertions(+), 79 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vincent Hanquez
2009-Dec-29 18:06 UTC
[Xen-devel] [PATCH 03/11] remove useless smac in the nic_info structure
the string representing the mac is easily recomputed from the mac array Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- tools/libxl/libxl.c | 6 ++++-- tools/libxl/libxl.h | 1 - tools/libxl/xl.c | 3 --- 3 files changed, 4 insertions(+), 6 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vincent Hanquez
2009-Dec-29 18:06 UTC
[Xen-devel] [PATCH 04/11] remove structure init from the library and structure domid fixup completly
structure init are more accurately done in the client of the library. Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- tools/libxl/libxl.c | 173 +++++---------------------------------------------- tools/libxl/libxl.h | 16 ----- tools/libxl/xl.c | 121 ++++++++++++++++++++++++++++++++++-- 3 files changed, 130 insertions(+), 180 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vincent Hanquez
2009-Dec-29 18:06 UTC
[Xen-devel] [PATCH 05/11] hide internal logging from client
reimplement simple logging in xl, the XL_LOG facilities are a means for the library to communicate back to the client, not for a logging library that may be redundant with what the client use. Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- tools/libxl/libxl.h | 21 --------------------- tools/libxl/libxl_internal.h | 22 ++++++++++++++++++++++ tools/libxl/xl.c | 27 +++++++++++++++++++++------ 3 files changed, 43 insertions(+), 27 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vincent Hanquez
2009-Dec-29 18:06 UTC
[Xen-devel] [PATCH 06/11] remove waitpid wrapper that''s doesn''t do anything
if the waitpid callback isn''t defined just call normal waitpid Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- tools/libxl/libxl.c | 2 -- tools/libxl/libxl_exec.c | 16 ++++++++-------- tools/libxl/libxl_internal.h | 1 - 3 files changed, 8 insertions(+), 11 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vincent Hanquez
2009-Dec-29 18:06 UTC
[Xen-devel] [PATCH 07/11] add useful xc flags in the xl_dominfo structure
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- tools/libxl/libxl.c | 8 ++++++++ tools/libxl/libxl.h | 3 +++ 2 files changed, 11 insertions(+), 0 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vincent Hanquez
2009-Dec-29 18:06 UTC
[Xen-devel] [PATCH 08/11] remove API for dominfolist and list that returns xc_dominfo.
fixup xl and part of libxl that use those API, to use simpler, faster and less wasteful API (doesn''t need to get the info about all domains when looking for one specific domain). Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- tools/libxl/libxl.c | 61 +++++----------------------------------------- tools/libxl/libxl.h | 4 +-- tools/libxl/libxl_dom.c | 20 +++++++-------- tools/libxl/xl.c | 23 +++++++---------- 4 files changed, 26 insertions(+), 82 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- tools/libxl/libxl_dom.c | 15 +++++++++++++++ tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 18 insertions(+), 0 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vincent Hanquez
2009-Dec-29 18:06 UTC
[Xen-devel] [PATCH 10/11] define errors as an enum instead of define random values.
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- tools/libxl/libxl.h | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vincent Hanquez
2009-Dec-29 18:06 UTC
[Xen-devel] [PATCH 11/11] add a versioning number to ctx_init that permit to detect incompatible client.
at the moment if the versioning of the library is not exactly the same used in the client then the ctx_init return an ERROR_VERSION. however the same mechanism can be use in the future to be able to support older version and offer a compatibility layer. Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- tools/libxl/libxl.c | 4 +++- tools/libxl/libxl.h | 4 +++- tools/libxl/xl.c | 24 ++++++++++++------------ 3 files changed, 18 insertions(+), 14 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vincent Hanquez writes ("[Xen-devel] [PATCH 00/11] XL API fixes and cleanup"):> this patchset contains API fixes and cleanup on the XL library. > removing the number of exposed API to the client, and simplify the > API where possible.Since this very large patchset was applied, a week and a half ago, libxenlight has been almost completely broken, at least as seen from its command line interface (and unit test), xl. Evidently it wasn''t properly tested; recent followup attempts to fix it haven''t fixed it yet. Perhaps it is time to revert this patch series and ask for a resubmission following proper testing ? Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel