* [PATCH for-4.7, 4.6] libxl: do not assume Dom0 backend while getting nic info
@ 2016-09-05 10:15 Marek Marczykowski-Górecki
2016-09-19 14:43 ` Ian Jackson
0 siblings, 1 reply; 3+ messages in thread
From: Marek Marczykowski-Górecki @ 2016-09-05 10:15 UTC (permalink / raw)
To: xen-devel; +Cc: Wei Liu, Ian Jackson, Marek Marczykowski-Górecki
[-- Attachment #1.1: Type: text/plain, Size: 1033 bytes --]
Fill backend_domid field based on backend path.
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
tools/libxl/libxl.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index e1ab6ec..9a888a1 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -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");
--
2.5.5
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH for-4.7, 4.6] libxl: do not assume Dom0 backend while getting nic info
2016-09-05 10:15 [PATCH for-4.7, 4.6] libxl: do not assume Dom0 backend while getting nic info Marek Marczykowski-Górecki
@ 2016-09-19 14:43 ` Ian Jackson
2016-09-19 15:43 ` Ian Jackson
0 siblings, 1 reply; 3+ messages in thread
From: Ian Jackson @ 2016-09-19 14:43 UTC (permalink / raw)
To: Marek Marczykowski-Górecki; +Cc: Wei Liu, xen-devel
Marek Marczykowski-Górecki writes ("[PATCH for-4.7,4.6] libxl: do not assume Dom0 backend while getting nic info"):
> 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
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH for-4.7, 4.6] libxl: do not assume Dom0 backend while getting nic info
2016-09-19 14:43 ` Ian Jackson
@ 2016-09-19 15:43 ` Ian Jackson
0 siblings, 0 replies; 3+ messages in thread
From: Ian Jackson @ 2016-09-19 15:43 UTC (permalink / raw)
To: Marek Marczykowski-Górecki, xen-devel, Wei Liu
Ian Jackson writes ("Re: [PATCH for-4.7,4.6] libxl: do not assume Dom0 backend while getting nic info"):
> Marek Marczykowski-Górecki writes ("[PATCH for-4.7,4.6] libxl: do not assume Dom0 backend while getting nic info"):
> > 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
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-19 15:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-05 10:15 [PATCH for-4.7, 4.6] libxl: do not assume Dom0 backend while getting nic info Marek Marczykowski-Górecki
2016-09-19 14:43 ` Ian Jackson
2016-09-19 15:43 ` Ian Jackson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).