[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 09/13 V6] remus: use the API to setup network buffering
From: Shriram Rajagopalan <rshriram@xxxxxxxxx> If there is network buffering hotplug scripts, call libxl__remus_netbuf_setup() to setup the network buffering. Signed-off-by: Shriram Rajagopalan <rshriram@xxxxxxxxx> Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx> Reviewed-by: Wen Congyang <wency@xxxxxxxxxxxxxx> --- tools/libxl/libxl.c | 2 +- tools/libxl/libxl_internal.h | 3 +++ tools/libxl/libxl_remus.c | 10 ++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 026206a..f45fd74 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -762,7 +762,7 @@ int libxl_domain_remus_start(libxl_ctx *ctx, libxl_domain_remus_info *info, } /* Point of no return */ - libxl__domain_suspend(egc, dss); + libxl__remus_setup_initiate(egc, dss); return AO_INPROGRESS; out: diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 358590b..657cfc4 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -2336,6 +2336,9 @@ _hidden void libxl__remus_teardown_done(libxl__egc *egc, _hidden void libxl__remus_netbuf_teardown(libxl__egc *egc, libxl__domain_suspend_state *dss); +_hidden void libxl__remus_setup_initiate(libxl__egc *egc, + libxl__domain_suspend_state *dss); + struct libxl__domain_suspend_state { /* set by caller of libxl__domain_suspend */ libxl__ao *ao; diff --git a/tools/libxl/libxl_remus.c b/tools/libxl/libxl_remus.c index 6790c61..38776e1 100644 --- a/tools/libxl/libxl_remus.c +++ b/tools/libxl/libxl_remus.c @@ -19,6 +19,16 @@ /*----- remus setup/teardown code -----*/ +void libxl__remus_setup_initiate(libxl__egc *egc, + libxl__domain_suspend_state *dss) +{ + libxl__ev_time_init(&dss->remus_state->timeout); + if (!dss->remus_state->netbufscript) + libxl__remus_setup_done(egc, dss, 0); + else + libxl__remus_netbuf_setup(egc, dss); +} + void libxl__remus_setup_done(libxl__egc *egc, libxl__domain_suspend_state *dss, int rc) -- 1.8.4.2 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |