[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] libxl: force netback to wait for hotplug execution before connecting
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Mon, 24 Jan 2022 17:02:48 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jfvPklOSDpUnAhCpobwRFBkRfn6mkddhxjHdfkQocDA=; b=KMgWLkPebE7OKO1m8KY4YO6ULVKiScDZDxOE72haz+gZfoq99D1D7V/xy3aUg8ByHQsPjjQcah/QRvQa89d2g11DaEQw6g8M/40mWa7zdy/lM66zSAQT9+5TniJrhz9zBrIr9o9Qwt23rM/BXoLgzym0yaz8OPhBJs29cLIEalhYPODT6TXjoSo6iUSWIwVp52qarbvV5k+TXgxQciyzyE4HtDhc8nAD1jKFUgwBaUv9lfWm0/3tOtF2uxzKge/iJMJx8X5fkCrY//DHDLCzWlaFt98RJA5JBCNd+T9N+r5H8jCa7NRZb2wfyEtMh+jJ8gF4IsmOj0BPC3Q/06+kzA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lXQyg8mprSTAPcqB/y3PH6NhPqDQu7Ll8STP4ng9kGEg0XxoMACpGHmPr7ES5sC1lMv7Pm4/uParbk5rgsT3JG0kKsCrF/NrpLTM/RSIuYT1sUsHqZhod88VwUF+MIG1yZiOuzIdW3g71ZiespjBRtuNJevrWCPwIkWGcy9jjXkUf12mBTPp8V8ieLhln6yhHBGlHExRfHTR9wt/8w/ESus9BdrgXJpchaPD3uuPrlHZfyoerM4tQD9HKw3G638sDzNGSKtQO3UbqAVHEGWCqpp8X3dF3HNPtFkCYnyFoQV3bPVT5lPRZKn5P8/WrAi8PEPro32fyaGPwtO/rYqNaQ==
- Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, James Dingwall <james-xen@xxxxxxxxxxxxxx>, Wei Liu <wei.liu@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>
- Delivery-date: Mon, 24 Jan 2022 16:03:19 +0000
- Ironport-data: A9a23:tG8Tka7mDCdSNAB28jyV5wxRtKzAchMFZxGqfqrLsTDasY5as4F+v jQbDGDSOq7bY2D1fN8ibd/n904BvpfXyN9iQAI+rHs8Hi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuV3zyIQUBUjclkfJKlYAL/En03FV8MpBsJ00o5wbZg2NIw2LBVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7pGTU2FFFPqQ5E8IwKPb 72rIIdVXI/u10xF5tuNyt4Xe6CRK1LYFVDmZnF+A8BOjvXez8CbP2lS2Pc0MC9qZzu1c99Z1 /kWpKCRVlkQIqSSyfU6Cj1ITj5GBPgTkFPHCSDXXc27ykTHdz3nwul0DVFwNoodkgp1KTgQr 7pCcmlLN03dwbLtqF64YrAEasALNs7kMZlZonh95TrYEewnUdbIRKCiCdpwgm1p3pEQRa22i 8wxVx1XaguRXwdzfUooKLkYmcW0nT64WmgNwL6SjfVuuDWCpOBr65DvOd/YYZmaSMN9kkeeq X3P+2C/BxxcKd/34SWI8zSoh/Lnni7hXo8WUrqi+ZZCmFSOwkQDBRtQUkG0ydGph0j7V99BJ kg8/is1sbN05EGtVsP6XRCzvDiDpBF0c8VUO/037keK0KW8ywSWHG8fVRZadcc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mrX5WI3NYOCIghrPEGgP1/qB/9SCIVyAygc+79 YYT0EWMrSZZjIb/KXHCWGDYqodKbK8gceVbInlvhJQpVYAUdAc0+41MHfTLmRGAC19QbYpHp uV4cRK4xKmZHQsd8y+Ql0IRfLKqdHnnI/vJUduPW9t1CC+yReTrJLqGRmR2RkTFxtJ3LcZ6G DA1yj0/L+qvf2XwgLVk0XT85NVst38zcYrPr3FtuElbhHXziq4boVoXLOP+BgzveGU8V4v1O LBph8xVv4Dn0/5TyWQm1/AygPg2DEh5zvJ0lmDm0bupsT/WXYTF9dBrZgxSGqU12MQ+PVHlI 5b1WOQsJRaSTnamj7m2tTOXxZ20mKpvHsZl/IJhXA3a/pSVFZol/1QwKppKuZAIMqjg7pXUN WGTfusrsq+SGnqIEww5QJUsZ+RtndaJGbyfqFNgL3W79FspgEJ86Iv/r1sop4xzuNCd3B63Z W1Dk0RrsA3ciY3V9MLOA5Te7rANoTyKSi8Q156Z26XUZ06Bw==
- Ironport-sdr: FNCIAW0fKnbpv2mB9jNUwfZzgwubMqr3R4neb9JQoqclex/uBD/CKWFLjzuJvmFsQnZ9dL/Ahh BBijlLcwDEATquub9W9HqiKB5uYbInL34nCD6pzN17dIbRVSw3zNd57lt53z/7smmrWSWc8aKz 4zLh/onnY5lIQSjdYMu8hWdFFC0F2m+BlzI/67mlkC4NfgFowOyTmPDhxDv6+Z5AarvK9Tskng 0pOWceLnYh1sLjVe32ndgIt7QdnF1i5SxDFz2UOBecrc3T/sCkBDjgDtx1YKxiAuvuELnvC4ZB +6JCJ3ztaseZ9tF0vTTrY+fZ
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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 <james-xen@xxxxxxxxxxxxxx>
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Tested-by: James Dingwall <james-xen@xxxxxxxxxxxxxx>
---
Cc: Wei Liu <wei.liu@xxxxxxxxxx>
Cc: Paul Durrant <paul@xxxxxxx>
---
tools/libs/light/libxl_nic.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/libs/light/libxl_nic.c b/tools/libs/light/libxl_nic.c
index 0b45469dca..0b9e70c9d1 100644
--- a/tools/libs/light/libxl_nic.c
+++ b/tools/libs/light/libxl_nic.c
@@ -248,6 +248,13 @@ static int libxl__set_xenstore_nic(libxl__gc *gc, uint32_t
domid,
flexarray_append(ro_front, "mtu");
flexarray_append(ro_front, GCSPRINTF("%u", nic->mtu));
+ /*
+ * Force backend to wait for hotplug script execution before switching to
+ * connected state.
+ */
+ flexarray_append(back, "hotplug-status");
+ flexarray_append(back, "");
+
return 0;
}
--
2.34.1
|