Re: [PATCH v4 1/3] QIOChannel: Add io_writev_zerocopy & io_flush_zerocopy callbacks

2021-10-27 Thread Leonardo Bras Soares Passos
On Wed, Oct 27, 2021 at 3:15 AM Peter Xu wrote: > > On Wed, Oct 27, 2021 at 03:07:13AM -0300, Leonardo Bras Soares Passos wrote: > > > > > > > >if (flags & ZEROCOPY) { > > > >assert(fds == NULL && nfds == 0); > > > > Quick question: Why is this assert needed? > > Not

Re: [PATCH v4 1/3] QIOChannel: Add io_writev_zerocopy & io_flush_zerocopy callbacks

2021-10-27 Thread Peter Xu
On Wed, Oct 27, 2021 at 03:07:13AM -0300, Leonardo Bras Soares Passos wrote: > > > > > >if (flags & ZEROCOPY) { > > >assert(fds == NULL && nfds == 0); > > Quick question: Why is this assert needed? Not required I think; just want to make sure no one passes in the fds

Re: [PATCH v4 1/3] QIOChannel: Add io_writev_zerocopy & io_flush_zerocopy callbacks

2021-10-27 Thread Leonardo Bras Soares Passos
Hello Peter, sorry for the delay. On Wed, Oct 13, 2021 at 3:33 AM Peter Xu wrote: > > On Wed, Oct 13, 2021 at 02:07:13PM +0800, Peter Xu wrote: > > On Sat, Oct 09, 2021 at 04:56:11AM -0300, Leonardo Bras wrote: > > > -int qio_channel_writev_full_all(QIOChannel *ioc, > > > -

Re: [PATCH v4 1/3] QIOChannel: Add io_writev_zerocopy & io_flush_zerocopy callbacks

2021-10-13 Thread Peter Xu
On Wed, Oct 13, 2021 at 02:07:13PM +0800, Peter Xu wrote: > On Sat, Oct 09, 2021 at 04:56:11AM -0300, Leonardo Bras wrote: > > -int qio_channel_writev_full_all(QIOChannel *ioc, > > -const struct iovec *iov, > > -size_t niov, > > -

Re: [PATCH v4 1/3] QIOChannel: Add io_writev_zerocopy & io_flush_zerocopy callbacks

2021-10-13 Thread Peter Xu
On Sat, Oct 09, 2021 at 04:56:11AM -0300, Leonardo Bras wrote: > -int qio_channel_writev_full_all(QIOChannel *ioc, > -const struct iovec *iov, > -size_t niov, > -int *fds, size_t nfds, > -

Re: [PATCH v4 1/3] QIOChannel: Add io_writev_zerocopy & io_flush_zerocopy callbacks

2021-10-11 Thread Leonardo Bras Soares Passos
On Mon, Oct 11, 2021 at 5:45 PM Eric Blake wrote: > > On Mon, Oct 11, 2021 at 04:38:23PM -0300, Leonardo Bras Soares Passos wrote: > > > > /** > > > > - * qio_channel_writev_full: > > > > + * qio_channel_writev_full_flags: > > > > * @ioc: the channel object > > > > * @iov: the array of

Re: [PATCH v4 1/3] QIOChannel: Add io_writev_zerocopy & io_flush_zerocopy callbacks

2021-10-11 Thread Eric Blake
On Mon, Oct 11, 2021 at 04:38:23PM -0300, Leonardo Bras Soares Passos wrote: > > > /** > > > - * qio_channel_writev_full: > > > + * qio_channel_writev_full_flags: > > > * @ioc: the channel object > > > * @iov: the array of memory regions to write data from > > > * @niov: the length of the

Re: [PATCH v4 1/3] QIOChannel: Add io_writev_zerocopy & io_flush_zerocopy callbacks

2021-10-11 Thread Leonardo Bras Soares Passos
Hello Eric, thank you for the feedback! On Mon, Oct 11, 2021 at 4:17 PM Eric Blake wrote: > > On Sat, Oct 09, 2021 at 04:56:11AM -0300, Leonardo Bras wrote: > > Adds io_async_writev and io_async_flush as optional callback to > > QIOChannelClass, > > Are these names accurate? I am sorry, I

Re: [PATCH v4 1/3] QIOChannel: Add io_writev_zerocopy & io_flush_zerocopy callbacks

2021-10-11 Thread Eric Blake
On Sat, Oct 09, 2021 at 04:56:11AM -0300, Leonardo Bras wrote: > Adds io_async_writev and io_async_flush as optional callback to > QIOChannelClass, Are these names accurate? > allowing the implementation of asynchronous writes by subclasses. > > How to use them: > - Write data using