Skip to content

Commit 59a5fbd

Browse files
roygerjbeulich
authored andcommitted
libxl: force netback to wait for hotplug execution before connecting
By writing an empty "hotplug-status" xenstore node in the backend path libxl can force Linux netback to wait for hotplug script execution before proceeding to the 'connected' state. This is required so that netback doesn't skip state 2 (InitWait) and thus blocks libxl waiting for such state in order to launch the hotplug script (see libxl__wait_device_connection). Reported-by: James Dingwall <[email protected]> Signed-off-by: Roger Pau Monné <[email protected]> Tested-by: James Dingwall <[email protected]> Reviewed-by: Paul Durrant <[email protected]> Tested-by: Julien Grall <[email protected]> Reviewed-by: Wei Liu <[email protected]> master commit: 0bdc43c master date: 2022-01-27 13:51:19 +0100
1 parent 11eedbb commit 59a5fbd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/libs/light/libxl_nic.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,13 @@ static int libxl__set_xenstore_nic(libxl__gc *gc, uint32_t domid,
248248
flexarray_append(ro_front, "mtu");
249249
flexarray_append(ro_front, GCSPRINTF("%u", nic->mtu));
250250

251+
/*
252+
* Force backend to wait for hotplug script execution before switching to
253+
* connected state.
254+
*/
255+
flexarray_append(back, "hotplug-status");
256+
flexarray_append(back, "");
257+
251258
return 0;
252259
}
253260

0 commit comments

Comments
 (0)