Re: [PATCH v3 2/3] QIOChannelSocket: Implement io_async_write & io_async_flush

2021-09-30 Thread Daniel P . Berrangé
On Wed, Sep 29, 2021 at 04:32:12PM -0300, Leonardo Bras Soares Passos wrote: > Hello Daniel, > > On Fri, Sep 24, 2021 at 2:38 PM Daniel P. Berrangé > wrote: > [...] > > > @@ -154,6 +171,19 @@ int qio_channel_socket_connect_sync(QIOChannelSocket > > > *ioc, > > > return -1; > > > }

Re: [PATCH v3 2/3] QIOChannelSocket: Implement io_async_write & io_async_flush

2021-09-29 Thread Peter Xu
On Wed, Sep 29, 2021 at 04:36:10PM -0300, Leonardo Bras Soares Passos wrote: > On Tue, Sep 28, 2021 at 7:45 PM Peter Xu wrote: > > > > On Wed, Sep 22, 2021 at 07:24:22PM -0300, Leonardo Bras wrote: > > > +static void qio_channel_socket_async_flush(QIOChannel *ioc, > > > +

Re: [PATCH v3 2/3] QIOChannelSocket: Implement io_async_write & io_async_flush

2021-09-29 Thread Leonardo Bras Soares Passos
On Tue, Sep 28, 2021 at 7:45 PM Peter Xu wrote: > > On Wed, Sep 22, 2021 at 07:24:22PM -0300, Leonardo Bras wrote: > > +static void qio_channel_socket_async_flush(QIOChannel *ioc, > > + Error **errp) > > +{ > > +QIOChannelSocket *sioc = QIO_CHANNEL_SOC

Re: [PATCH v3 2/3] QIOChannelSocket: Implement io_async_write & io_async_flush

2021-09-29 Thread Leonardo Bras Soares Passos
Hello Daniel, On Fri, Sep 24, 2021 at 2:38 PM Daniel P. Berrangé wrote: [...] > > @@ -154,6 +171,19 @@ int qio_channel_socket_connect_sync(QIOChannelSocket > > *ioc, > > return -1; > > } > > > > +#ifdef CONFIG_LINUX > > +if (addr->type != SOCKET_ADDRESS_TYPE_INET) { > > +

Re: [PATCH v3 2/3] QIOChannelSocket: Implement io_async_write & io_async_flush

2021-09-28 Thread Peter Xu
On Wed, Sep 22, 2021 at 07:24:22PM -0300, Leonardo Bras wrote: > +static void qio_channel_socket_async_flush(QIOChannel *ioc, > + Error **errp) > +{ > +QIOChannelSocket *sioc = QIO_CHANNEL_SOCKET(ioc); > +struct msghdr msg = {}; > +struct pollfd

Re: [PATCH v3 2/3] QIOChannelSocket: Implement io_async_write & io_async_flush

2021-09-24 Thread Daniel P . Berrangé
On Wed, Sep 22, 2021 at 07:24:22PM -0300, Leonardo Bras wrote: > Implement the new optional callbacks io_async_write and io_async_flush on > QIOChannelSocket, but enables it only when MSG_ZEROCOPY feature is > available in the host kernel, and TCP sockets are used. > > qio_channel_socket_writev()

[PATCH v3 2/3] QIOChannelSocket: Implement io_async_write & io_async_flush

2021-09-22 Thread Leonardo Bras
Implement the new optional callbacks io_async_write and io_async_flush on QIOChannelSocket, but enables it only when MSG_ZEROCOPY feature is available in the host kernel, and TCP sockets are used. qio_channel_socket_writev() contents were moved to a helper function __qio_channel_socket_writev() wh