* [PATCH] libxl: do not assume Dom0 backend while getting nic info
@ 2016-09-05 9:24 Marek Marczykowski-Górecki
0 siblings, 0 replies; 7+ messages in thread
From: Marek Marczykowski-Górecki @ 2016-09-05 9:24 UTC (permalink / raw)
To: xen-devel; +Cc: Wei Liu, Ian Jackson, Marek Marczykowski-Górecki
Fill backend_domid field based on backend path.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] libxl: do not assume Dom0 backend while getting nic info
@ 2016-09-05 9:26 Marek Marczykowski-Górecki
2016-09-05 9:39 ` Wei Liu
0 siblings, 1 reply; 7+ messages in thread
From: Marek Marczykowski-Górecki @ 2016-09-05 9:26 UTC (permalink / raw)
To: xen-devel; +Cc: Wei Liu, Ian Jackson, Marek Marczykowski-Górecki
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_nic.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tools/libxl/libxl_nic.c b/tools/libxl/libxl_nic.c
index c34b7ba..d1caa90 100644
--- a/tools/libxl/libxl_nic.c
+++ b/tools/libxl/libxl_nic.c
@@ -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,
--
2.5.5
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] libxl: do not assume Dom0 backend while getting nic info
2016-09-05 9:26 Marek Marczykowski-Górecki
@ 2016-09-05 9:39 ` Wei Liu
2016-09-05 9:44 ` Marek Marczykowski-Górecki
0 siblings, 1 reply; 7+ messages in thread
From: Wei Liu @ 2016-09-05 9:39 UTC (permalink / raw)
To: Marek Marczykowski-Górecki; +Cc: Wei Liu, Ian Jackson, xen-devel
On Mon, Sep 05, 2016 at 11:26:04AM +0200, Marek Marczykowski-Górecki wrote:
> 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>
Acked-by: Wei Liu <wei.liu2@citrix.com>
I think this is a backport candidate?
> ---
> tools/libxl/libxl_nic.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/tools/libxl/libxl_nic.c b/tools/libxl/libxl_nic.c
> index c34b7ba..d1caa90 100644
> --- a/tools/libxl/libxl_nic.c
> +++ b/tools/libxl/libxl_nic.c
> @@ -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,
> --
> 2.5.5
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] libxl: do not assume Dom0 backend while getting nic info
2016-09-05 9:39 ` Wei Liu
@ 2016-09-05 9:44 ` Marek Marczykowski-Górecki
2016-09-05 9:53 ` Wei Liu
0 siblings, 1 reply; 7+ messages in thread
From: Marek Marczykowski-Górecki @ 2016-09-05 9:44 UTC (permalink / raw)
To: Wei Liu; +Cc: Ian Jackson, xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1795 bytes --]
On Mon, Sep 05, 2016 at 10:39:16AM +0100, Wei Liu wrote:
> On Mon, Sep 05, 2016 at 11:26:04AM +0200, Marek Marczykowski-Górecki wrote:
> > 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>
>
> Acked-by: Wei Liu <wei.liu2@citrix.com>
>
> 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?
> > ---
> > tools/libxl/libxl_nic.c | 12 ++++++++++++
> > 1 file changed, 12 insertions(+)
> >
> > diff --git a/tools/libxl/libxl_nic.c b/tools/libxl/libxl_nic.c
> > index c34b7ba..d1caa90 100644
> > --- a/tools/libxl/libxl_nic.c
> > +++ b/tools/libxl/libxl_nic.c
> > @@ -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,
> > --
> > 2.5.5
> >
--
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?
[-- 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 [flat|nested] 7+ messages in thread
* Re: [PATCH] libxl: do not assume Dom0 backend while getting nic info
2016-09-05 9:44 ` Marek Marczykowski-Górecki
@ 2016-09-05 9:53 ` Wei Liu
2016-09-05 10:39 ` Ian Jackson
0 siblings, 1 reply; 7+ messages in thread
From: Wei Liu @ 2016-09-05 9:53 UTC (permalink / raw)
To: Marek Marczykowski-Górecki; +Cc: Ian Jackson, Wei Liu, xen-devel
On Mon, Sep 05, 2016 at 11:44:46AM +0200, Marek Marczykowski-Górecki wrote:
> On Mon, Sep 05, 2016 at 10:39:16AM +0100, Wei Liu wrote:
> > On Mon, Sep 05, 2016 at 11:26:04AM +0200, Marek Marczykowski-Górecki wrote:
> > > 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>
> >
> > Acked-by: Wei Liu <wei.liu2@citrix.com>
> >
> > 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).
>
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.
> 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.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Please backport to version Z of Xen.
>
> > > ---
> > > tools/libxl/libxl_nic.c | 12 ++++++++++++
> > > 1 file changed, 12 insertions(+)
> > >
> > > diff --git a/tools/libxl/libxl_nic.c b/tools/libxl/libxl_nic.c
> > > index c34b7ba..d1caa90 100644
> > > --- a/tools/libxl/libxl_nic.c
> > > +++ b/tools/libxl/libxl_nic.c
> > > @@ -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,
> > > --
> > > 2.5.5
> > >
>
> --
> 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
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] libxl: do not assume Dom0 backend while getting nic info
2016-09-05 9:53 ` Wei Liu
@ 2016-09-05 10:39 ` Ian Jackson
2016-09-05 10:53 ` Wei Liu
0 siblings, 1 reply; 7+ messages in thread
From: Ian Jackson @ 2016-09-05 10:39 UTC (permalink / raw)
To: Wei Liu; +Cc: Marek Marczykowski-Górecki, xen-devel
Wei Liu writes ("Re: [PATCH] libxl: do not assume Dom0 backend while getting nic info"):
> On Mon, Sep 05, 2016 at 11:44:46AM +0200, Marek Marczykowski-Górecki wrote:
> > Yes, certainly. If you want I can send a 4.7 version (function is in
> > libxl.c there).
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
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] libxl: do not assume Dom0 backend while getting nic info
2016-09-05 10:39 ` Ian Jackson
@ 2016-09-05 10:53 ` Wei Liu
0 siblings, 0 replies; 7+ messages in thread
From: Wei Liu @ 2016-09-05 10:53 UTC (permalink / raw)
To: Ian Jackson; +Cc: Wei Liu, Marek Marczykowski-Górecki, xen-devel
On Mon, Sep 05, 2016 at 11:39:22AM +0100, Ian Jackson wrote:
> Wei Liu writes ("Re: [PATCH] libxl: do not assume Dom0 backend while getting nic info"):
> > On Mon, Sep 05, 2016 at 11:44:46AM +0200, Marek Marczykowski-Górecki wrote:
> > > Yes, certainly. If you want I can send a 4.7 version (function is in
> > > libxl.c there).
>
> 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.
> Thanks,
> Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-09-05 10:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-05 9:24 [PATCH] libxl: do not assume Dom0 backend while getting nic info Marek Marczykowski-Górecki
-- strict thread matches above, loose matches on Subject: below --
2016-09-05 9:26 Marek Marczykowski-Górecki
2016-09-05 9:39 ` Wei Liu
2016-09-05 9:44 ` Marek Marczykowski-Górecki
2016-09-05 9:53 ` Wei Liu
2016-09-05 10:39 ` Ian Jackson
2016-09-05 10:53 ` Wei Liu
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).