libxl: do not assume Dom0 backend while getting nic info
PATCH 1/1 libxl: do not assume Dom0 backend while getting nic info
Fill backend_domid field based on backend path.
--- tools/libxl/libxl_nic.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
tools/libxl/libxl_nic.c +12 -0
@@ -309,6 +309,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 = */ rc = libxl__xs_read_checked(gc, XBT_NULL,
Signature · 7 lines
2.5.5 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 5 lines · Marek Marczykowski-Górecki
Fill
backend_domidfield based on backend path.Cc Ian Jackson <[email protected]>Cc Wei Liu <[email protected]>Signed-off-by Marek Marczykowski-Górecki <[email protected]>
I think this is a backport candidate?
Quoted 30 lines
--- tools/libxl/libxl_nic.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)tools/libxl/libxl_nic.c +12
-0@@ -309,6 +309,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 = */ rc = libxl__xs_read_checked(gc, XBT_NULL,Signature · 1 line
2.5.5
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 10 lines · Wei Liu
Quoted 5 lines · Marek Marczykowski-Górecki
Fill
backend_domidfield based on backend path.Cc Ian Jackson <[email protected]>Cc Wei Liu <[email protected]>Signed-off-by Marek Marczykowski-Górecki <[email protected]>Acked-by Wei Liu <[email protected]>I think this is a backport candidate?
Yes, certainly. If you want I can send a 4.7 version (function is in libxl.c there).
In general, should I somehow somehow request a backport in the patch itself? How?
Quoted 30 lines
Quoted 30 lines
--- tools/libxl/libxl_nic.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)tools/libxl/libxl_nic.c +12
-0@@ -309,6 +309,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 = */ rc = libxl__xs_read_checked(gc, XBT_NULL,Signature · 1 line
2.5.5
Signature · 5 lines
Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 8 lines · Marek Marczykowski-Górecki
Quoted 7 lines · Wei Liu
Quoted 5 lines · Marek Marczykowski-Górecki
Fill
backend_domidfield based on backend path.Cc Ian Jackson <[email protected]>Cc Wei Liu <[email protected]>Signed-off-by Marek Marczykowski-Górecki <[email protected]>
Quoted 7 lines
Quoted 3 lines
Acked-by Wei Liu <[email protected]>I think this is a backport candidate?
Yes, certainly. If you want I can send a 4.7 version (function is in
libxl.cthere).
That would be helpful. Please use PATCH for-4.7 tag and use the technique I describe below to add postscript that you don't wish to be in commit message.
Quoted 2 lines
In general, should I somehow somehow request a backport in the patch itself? How?
State between the three dashes anything you wish to say --- the content would be automatically stripped out when committing. I normally do like this in commit message
libxl: fix foo
Foo is broken because of X, fix it by doing Y.
---
Please backport to version Z of Xen.
Quoted 27 lines
Quoted 27 lines
Quoted 27 lines
--- tools/libxl/libxl_nic.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)tools/libxl/libxl_nic.c +12
-0@@ -309,6 +309,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 = */
Quoted 11 lines
Quoted 4 lines
Quoted 4 lines
tools/libxl/libxl_nic.c +0
-0rc = libxl__xs_read_checked(gc, XBT_NULL,Signature · 1 line
2.5.5Signature · 5 lines
Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Wei Liu writes ("Re: [PATCH] libxl: do not assume Dom0 backend while getting nic info"):
Quoted 3 lines · Marek Marczykowski-Górecki
Quoted 2 lines
Yes, certainly. If you want I can send a 4.7 version (function is in
libxl.cthere).
Thanks for the backport.
Wei, can you mail me here (or tell me on irc) when the unstable fix goes into staging ?
Thanks,
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 10 lines · Ian Jackson
Wei Liu writes ("Re: [PATCH] libxl: do not assume Dom0 backend while getting nic info"):
Quoted 3 lines · Marek Marczykowski-Górecki
Quoted 2 lines
Yes, certainly. If you want I can send a 4.7 version (function is in
libxl.cthere).Thanks for the backport.
Wei, can you mail me here (or tell me on irc) when the unstable fix goes into staging ?
This patch is now in staging.
Wei.
Quoted 2 lines
Thanks,
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel