Skip to contentSkip to conversation

libxl: do not assume Dom0 backend while getting nic info

PATCH In review Marek Marczykowski-Górecki 2 participants 3 messages Sep 5, 2016 – Sep 19, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: do not assume Dom0 backend while getting nic info

Fill backend_domid field based on backend path.

---
 tools/libxl/libxl.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
tools/libxl/libxl.c +12 -0
index e1ab6ec..9a888a1 100644
@@ -3601,6 +3601,18 @@ static int libxl__device_nic_from_xenstore(libxl__gc *gc,
     else
         nic->devid = 0;
 
+    rc = libxl__xs_read_checked(gc, XBT_NULL,
+                                GCSPRINTF("%s/backend", libxl_path), &tmp);
+    if (rc) goto out;
+
+    if (!tmp) {
+        LOG(ERROR, "nic %s does not exist (no backend path)", libxl_path);
+        rc = ERROR_FAIL;
+        goto out;
+    }
+    rc = libxl__backendpath_parse_domid(gc, tmp, &nic->backend_domid);
+    if (rc) goto out;
+
     /* nic->mtu = */
 
     tmp = READ_LIBXLDEV(gc, "mac");
Signature · 1 line
2.5.5

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#1 lore raw

Marek Marczykowski-Górecki writes ("[PATCH for-4.7,4.6] libxl: do not assume Dom0 backend while getting nic info"):

Quoted 1 line

Fill backend_domid field based on backend path.

Thanks. I've put this in my queue, which I'm processing now. (That patch has been in master for a while now.)

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw

Ian Jackson writes ("Re: [PATCH for-4.7,4.6] libxl: do not assume Dom0 backend while getting nic info"):

Quoted 5 lines

Marek Marczykowski-Górecki writes ("[PATCH for-4.7,4.6] libxl: do not assume Dom0 backend while getting nic info"):

Quoted 1 line

Fill backend_domid field based on backend path.

Thanks. I've put this in my queue, which I'm processing now. (That patch has been in master for a while now.)

I have backported this to 4.7 and 4.6. It applies cleanly to 4.5 but since the purpose is to enable driver domains, and 4.5 is very old (out of bugfix support even), I don't propose to apply it there.

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel