Re: [PATCH v2 1/2] QIOChannelSocket: Reduce ifdefs to improve readability

2022-06-14 Thread Leonardo Bras Soares Passos
On Tue, Jun 14, 2022 at 5:36 AM Daniel P. Berrangé wrote: > > On Mon, Jun 13, 2022 at 06:21:18PM -0300, Leonardo Bras Soares Passos wrote: > > On Fri, Jun 10, 2022 at 5:25 AM Daniel P. Berrangé > > wrote: > > > > > > > [...] > > > > > Ok, so if it is checked earlier then we merely need an

Re: [PATCH v2 1/2] QIOChannelSocket: Reduce ifdefs to improve readability

2022-06-14 Thread Daniel P . Berrangé
On Mon, Jun 13, 2022 at 06:21:18PM -0300, Leonardo Bras Soares Passos wrote: > On Fri, Jun 10, 2022 at 5:25 AM Daniel P. Berrangé > wrote: > > > > [...] > > > Ok, so if it is checked earlier then we merely need an assert. > > > > if (flags & QIO_CHANNEL_WRITE_FLAG_ZERO_COPY) { > > #ifdef

Re: [PATCH v2 1/2] QIOChannelSocket: Reduce ifdefs to improve readability

2022-06-13 Thread Leonardo Bras Soares Passos
On Fri, Jun 10, 2022 at 5:25 AM Daniel P. Berrangé wrote: > [...] > Ok, so if it is checked earlier then we merely need an assert. > > if (flags & QIO_CHANNEL_WRITE_FLAG_ZERO_COPY) { > #ifdef QEMU_MSG_ZEROCOPY > sflags = MSG_ZEROCOPY; > zero_copy_enabled = true; > #else

Re: [PATCH v2 1/2] QIOChannelSocket: Reduce ifdefs to improve readability

2022-06-10 Thread Daniel P . Berrangé
On Thu, Jun 09, 2022 at 10:30:19PM -0300, Leonardo Bras Soares Passos wrote: > Hello Daniel, > > On Thu, Jun 9, 2022 at 5:10 AM Daniel P. Berrangé wrote: > > > > On Wed, Jun 08, 2022 at 06:04:02PM -0300, Leonardo Bras wrote: > > > During implementation of MSG_ZEROCOPY feature, a lot of #ifdefs

Re: [PATCH v2 1/2] QIOChannelSocket: Reduce ifdefs to improve readability

2022-06-09 Thread Leonardo Bras Soares Passos
Hello Daniel, On Thu, Jun 9, 2022 at 5:10 AM Daniel P. Berrangé wrote: > > On Wed, Jun 08, 2022 at 06:04:02PM -0300, Leonardo Bras wrote: > > During implementation of MSG_ZEROCOPY feature, a lot of #ifdefs were > > introduced, particularly at qio_channel_socket_writev(). > > > > Rewrite some of

Re: [PATCH v2 1/2] QIOChannelSocket: Reduce ifdefs to improve readability

2022-06-09 Thread Daniel P . Berrangé
On Wed, Jun 08, 2022 at 06:04:02PM -0300, Leonardo Bras wrote: > During implementation of MSG_ZEROCOPY feature, a lot of #ifdefs were > introduced, particularly at qio_channel_socket_writev(). > > Rewrite some of those changes so it's easier to read. >

[PATCH v2 1/2] QIOChannelSocket: Reduce ifdefs to improve readability

2022-06-08 Thread Leonardo Bras
During implementation of MSG_ZEROCOPY feature, a lot of #ifdefs were introduced, particularly at qio_channel_socket_writev(). Rewrite some of those changes so it's easier to read. ... Signed-off-by: Leonardo Bras ---