Message ID | 047e5ff567ac0c2e0bd92fd8741c03d07b548ab5.1579055705.git-series.marmarek@invisiblethingslab.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add support for qemu-xen runnning in a Linux-based stubdomain. | expand |
On Tue, Jan 14, 2020 at 9:42 PM Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> wrote: > > Let the server know when the client is connected. Otherwise server will > notice only when client send some data. > This change does not break existing clients, as libvchan user should > handle spurious notifications anyway (for example acknowledge of remote > side reading the data). > > Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> > --- > I had this patch in Qubes for a long time and totally forgot it wasn't > upstream thing... > --- > tools/libvchan/init.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tools/libvchan/init.c b/tools/libvchan/init.c > index 180833d..50a64c1 100644 > --- a/tools/libvchan/init.c > +++ b/tools/libvchan/init.c > @@ -447,6 +447,9 @@ struct libxenvchan *libxenvchan_client_init(struct xentoollog_logger *logger, > ctrl->ring->cli_live = 1; > ctrl->ring->srv_notify = VCHAN_NOTIFY_WRITE; > > + /* wake up the server */ > + xenevtchn_notify(ctrl->event, ctrl->event_port); Looks like you used 4 spaces, but the upstream file uses hard tabs. Regards, Jason > out: > if (xs) > xs_daemon_close(xs); > -- > git-series 0.9.1 > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xenproject.org > https://lists.xenproject.org/mailman/listinfo/xen-devel
On Mon, Jan 20, 2020 at 02:44:58PM -0500, Jason Andryuk wrote: > On Tue, Jan 14, 2020 at 9:42 PM Marek Marczykowski-Górecki > <marmarek@invisiblethingslab.com> wrote: > > > > Let the server know when the client is connected. Otherwise server will > > notice only when client send some data. > > This change does not break existing clients, as libvchan user should > > handle spurious notifications anyway (for example acknowledge of remote > > side reading the data). > > > > Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> > > --- > > I had this patch in Qubes for a long time and totally forgot it wasn't > > upstream thing... > > --- > > tools/libvchan/init.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/tools/libvchan/init.c b/tools/libvchan/init.c > > index 180833d..50a64c1 100644 > > --- a/tools/libvchan/init.c > > +++ b/tools/libvchan/init.c > > @@ -447,6 +447,9 @@ struct libxenvchan *libxenvchan_client_init(struct xentoollog_logger *logger, > > ctrl->ring->cli_live = 1; > > ctrl->ring->srv_notify = VCHAN_NOTIFY_WRITE; > > > > + /* wake up the server */ > > + xenevtchn_notify(ctrl->event, ctrl->event_port); > > Looks like you used 4 spaces, but the upstream file uses hard tabs. Indeed. CODING_STYLE says spaces, but it also says some tools/* are not directly covered by this file. Should I use this occasion to convert tools/libvchan/* to spaces (in a separate patch), or keep tabs (and adjust my patch)?
On Tue, Jan 21, 2020 at 4:28 PM Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> wrote: > > On Mon, Jan 20, 2020 at 02:44:58PM -0500, Jason Andryuk wrote: > > On Tue, Jan 14, 2020 at 9:42 PM Marek Marczykowski-Górecki > > <marmarek@invisiblethingslab.com> wrote: > > > > > > Let the server know when the client is connected. Otherwise server will > > > notice only when client send some data. > > > This change does not break existing clients, as libvchan user should > > > handle spurious notifications anyway (for example acknowledge of remote > > > side reading the data). > > > > > > Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> > > > --- > > > I had this patch in Qubes for a long time and totally forgot it wasn't > > > upstream thing... > > > --- > > > tools/libvchan/init.c | 3 +++ > > > 1 file changed, 3 insertions(+) > > > > > > diff --git a/tools/libvchan/init.c b/tools/libvchan/init.c > > > index 180833d..50a64c1 100644 > > > --- a/tools/libvchan/init.c > > > +++ b/tools/libvchan/init.c > > > @@ -447,6 +447,9 @@ struct libxenvchan *libxenvchan_client_init(struct xentoollog_logger *logger, > > > ctrl->ring->cli_live = 1; > > > ctrl->ring->srv_notify = VCHAN_NOTIFY_WRITE; > > > > > > + /* wake up the server */ > > > + xenevtchn_notify(ctrl->event, ctrl->event_port); > > > > Looks like you used 4 spaces, but the upstream file uses hard tabs. > > Indeed. CODING_STYLE says spaces, but it also says some tools/* are not > directly covered by this file. Should I use this occasion to convert > tools/libvchan/* to spaces (in a separate patch), or keep tabs (and > adjust my patch)? Maybe adjust your patch for tabs in case someone wants to backport it. And then convert to spaces in a separate patch. Regards, Jason
diff --git a/tools/libvchan/init.c b/tools/libvchan/init.c index 180833d..50a64c1 100644 --- a/tools/libvchan/init.c +++ b/tools/libvchan/init.c @@ -447,6 +447,9 @@ struct libxenvchan *libxenvchan_client_init(struct xentoollog_logger *logger, ctrl->ring->cli_live = 1; ctrl->ring->srv_notify = VCHAN_NOTIFY_WRITE; + /* wake up the server */ + xenevtchn_notify(ctrl->event, ctrl->event_port); + out: if (xs) xs_daemon_close(xs);
Let the server know when the client is connected. Otherwise server will notice only when client send some data. This change does not break existing clients, as libvchan user should handle spurious notifications anyway (for example acknowledge of remote side reading the data). Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> --- I had this patch in Qubes for a long time and totally forgot it wasn't upstream thing... --- tools/libvchan/init.c | 3 +++ 1 file changed, 3 insertions(+)