[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/3] QIOChannel: Add io_async_writev & io_async_flush call
From: |
Peter Xu |
Subject: |
Re: [PATCH v3 1/3] QIOChannel: Add io_async_writev & io_async_flush callbacks |
Date: |
Tue, 28 Sep 2021 17:52:05 -0400 |
On Fri, Sep 24, 2021 at 06:16:04PM +0100, Daniel P. Berrangé wrote:
> > +ssize_t qio_channel_async_writev(QIOChannel *ioc,
> > + const struct iovec *iov,
> > + size_t niov,
> > + int *fds,
> > + size_t nfds,
> > + Error **errp);
>
> This is missing any flags. We need something like
>
> QIO_CHANNEL_WRITE_FLAG_ZEROCOPY
>
> passed in an 'unsigned int flags' parameter. This in
> turn makes me question whether we should have the
> common helpers at all, as the api is going to be
> different for sync vs async.
>
> The QIOChannelFeature enum probably ought to be
> extended with QIO_CHANNEL_FEATURE_WRITE_ZEROCOPY with
> support for probing whether that's supported or not.
I'm also wondering whether we could just drop the fds/nfds as per my knowledge
SCM_RIGHT is the only user, at the meantime I don't see why an async interface
would pass in any fd anyways.. Thanks,
--
Peter Xu
[PATCH v3 2/3] QIOChannelSocket: Implement io_async_write & io_async_flush, Leonardo Bras, 2021/09/22
Re: [PATCH v3 2/3] QIOChannelSocket: Implement io_async_write & io_async_flush, Peter Xu, 2021/09/28