Re: [PATCH v11 2/7] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-05-05 Thread Leonardo Bras Soares Passos
On Thu, May 5, 2022 at 12:55 PM Daniel P. Berrangé wrote: > > On Thu, May 05, 2022 at 12:42:47PM -0300, Leonardo Bras Soares Passos wrote: > > > > Hello Daniel, > > > > But what if this gets compiled in a Linux system without MSG_ZEROCOPY > > support? > > As qapi will have zero-copy-send as an

Re: [PATCH v11 2/7] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-05-05 Thread Daniel P . Berrangé
On Thu, May 05, 2022 at 12:42:47PM -0300, Leonardo Bras Soares Passos wrote: > > Hello Daniel, > > But what if this gets compiled in a Linux system without MSG_ZEROCOPY support? > As qapi will have zero-copy-send as an option we could have this scenario: > > - User request migration using

Re: [PATCH v11 2/7] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-05-05 Thread Leonardo Bras Soares Passos
On Thu, May 5, 2022 at 5:05 AM Daniel P. Berrangé wrote: > > On Wed, May 04, 2022 at 04:18:31PM -0300, Leonardo Bras wrote: > > For CONFIG_LINUX, implement the new zero copy flag and the optional callback > > io_flush on QIOChannelSocket, but enables it only when MSG_ZEROCOPY > > feature is

Re: [PATCH v11 2/7] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-05-05 Thread Peter Xu
On Thu, May 05, 2022 at 01:20:04AM -0300, Leonardo Bras Soares Passos wrote: > (2) is already implemented in v11, but I have no issue implementing > (1) for v12 if it's ok to create this 'global' define. Dan's suggestion in the other thread sounds good to me with current approach, on having

Re: [PATCH v11 2/7] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-05-05 Thread Daniel P . Berrangé
On Wed, May 04, 2022 at 04:18:31PM -0300, Leonardo Bras wrote: > For CONFIG_LINUX, implement the new zero copy flag and the optional callback > io_flush on QIOChannelSocket, but enables it only when MSG_ZEROCOPY > feature is available in the host kernel, which is checked on >

Re: [PATCH v11 2/7] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-05-04 Thread Leonardo Bras Soares Passos
On Wed, May 4, 2022 at 4:53 PM Peter Xu wrote: > > On Wed, May 04, 2022 at 04:18:31PM -0300, Leonardo Bras wrote: > > +/* > > + * Zero-copy defines bellow are included to avoid breaking builds on > > systems > > + * that don't support MSG_ZEROCOPY, while keeping the functions more > > readable

Re: [PATCH v11 2/7] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-05-04 Thread Peter Xu
On Wed, May 04, 2022 at 04:18:31PM -0300, Leonardo Bras wrote: > +/* > + * Zero-copy defines bellow are included to avoid breaking builds on systems > + * that don't support MSG_ZEROCOPY, while keeping the functions more readable > + * (without a lot of ifdefs). > + */ > +#ifndef MSG_ZEROCOPY >

[PATCH v11 2/7] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-05-04 Thread Leonardo Bras
For CONFIG_LINUX, implement the new zero copy flag and the optional callback io_flush on QIOChannelSocket, but enables it only when MSG_ZEROCOPY feature is available in the host kernel, which is checked on qio_channel_socket_connect_sync() qio_channel_socket_flush() was implemented by counting