Re: [Xen-devel] [PATCH v5 03/15] libxl_qmp: Implement fd callback and read data [and 1 more messages]

2018-10-30 Thread Ian Jackson
Anthony PERARD writes ("Re: [PATCH v5 03/15] libxl_qmp: Implement fd callback and read data [and 1 more messages]"): > On Mon, Oct 29, 2018 at 05:31:59PM +, Ian Jackson wrote: > > To be honest this condition is a bit fiddly. Why not do this after > > subtracting buf_consumed from buf_used and

Re: [Xen-devel] [PATCH v5 03/15] libxl_qmp: Implement fd callback and read data [and 1 more messages]

2018-10-30 Thread Anthony PERARD
On Mon, Oct 29, 2018 at 05:31:59PM +, Ian Jackson wrote: > Anthony PERARD writes ("Re: [PATCH v5 03/15] libxl_qmp: Implement fd callback > and read data [and 1 more messages]"): > > On Mon, Oct 15, 2018 at 05:35:36PM +0100, Ian Jackson wrote: > > > > +ev->buf_consumed += len; > > > > +

Re: [Xen-devel] [PATCH v5 03/15] libxl_qmp: Implement fd callback and read data [and 1 more messages]

2018-10-29 Thread Ian Jackson
Anthony PERARD writes ("Re: [PATCH v5 03/15] libxl_qmp: Implement fd callback and read data [and 1 more messages]"): > On Mon, Oct 15, 2018 at 05:35:36PM +0100, Ian Jackson wrote: > > What are LIBXL__QMP_ERROR_CLASSes and why are they even different from > > ERROR_* values ? Maybe one of them is

Re: [Xen-devel] [PATCH v5 03/15] libxl_qmp: Implement fd callback and read data [and 1 more messages]

2018-10-29 Thread Anthony PERARD
On Mon, Oct 15, 2018 at 05:35:36PM +0100, Ian Jackson wrote: > > +static int qmp_error_class_to_libxl_error_code(const > > libxl__qmp_error_class c) > > +{ > > +switch (c) { > > +case LIBXL__QMP_ERROR_CLASS_GENERICERROR: > > +return ERROR_QMP_GENERIC_ERROR; > > +case LIBXL__QMP

Re: [Xen-devel] [PATCH v5 03/15] libxl_qmp: Implement fd callback and read data [and 1 more messages]

2018-10-15 Thread Ian Jackson
As discussed, I squwashed several of these patches together and I'm now doing my code review on the result. I've gone through it in some detail. Again, I asked for more internal documentation about the legal states etc. I will have to read it in detail again I'm afraid after that is done. The

Re: [Xen-devel] [PATCH v5 03/15] libxl_qmp: Implement fd callback and read data

2018-10-15 Thread Ian Jackson
Anthony PERARD writes ("Re: [PATCH v5 03/15] libxl_qmp: Implement fd callback and read data"): > On Wed, Oct 10, 2018 at 04:47:08PM +0100, Ian Jackson wrote: > > Lines too long again. (I will stop complaining about this now but can > > you pleae fix it throughout?) > > But the comment is less th

Re: [Xen-devel] [PATCH v5 03/15] libxl_qmp: Implement fd callback and read data

2018-10-11 Thread Anthony PERARD
On Wed, Oct 10, 2018 at 04:47:08PM +0100, Ian Jackson wrote: > Anthony PERARD writes ("[PATCH v5 03/15] libxl_qmp: Implement fd callback and > read data"): > > First step into taking care of the input from QEMU's QMP socket. For > > now, we read data and store them in a buffer. > ... > > +if (

Re: [Xen-devel] [PATCH v5 03/15] libxl_qmp: Implement fd callback and read data

2018-10-10 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v5 03/15] libxl_qmp: Implement fd callback and read data"): > First step into taking care of the input from QEMU's QMP socket. For > now, we read data and store them in a buffer. ... > +if (!ev->rx_buf) { > +ev->rx_buf = libxl__malloc(NOGC, QMP_RECEIVE_BU