qemu-e2k/include
Leonardo Bras b88651cb4d QIOChannel: Add flags on io_writev and introduce io_flush callback
Add flags to io_writev and introduce io_flush as optional callback to
QIOChannelClass, allowing the implementation of zero copy writes by
subclasses.

How to use them:
- Write data using qio_channel_writev*(...,QIO_CHANNEL_WRITE_FLAG_ZERO_COPY),
- Wait write completion with qio_channel_flush().

Notes:
As some zero copy write implementations work asynchronously, it's
recommended to keep the write buffer untouched until the return of
qio_channel_flush(), to avoid the risk of sending an updated buffer
instead of the buffer state during write.

As io_flush callback is optional, if a subclass does not implement it, then:
- io_flush will return 0 without changing anything.

Also, some functions like qio_channel_writev_full_all() were adapted to
receive a flag parameter. That allows shared code between zero copy and
non-zero copy writev, and also an easier implementation on new flags.

Signed-off-by: Leonardo Bras <leobras@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20220513062836.965425-3-leobras@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2022-05-16 13:56:24 +01:00
..
authz Prefer 'on' | 'off' over 'yes' | 'no' for bool options 2021-01-29 17:07:53 +00:00
block nbd/server: Allow MULTI_CONN for shared writable exports 2022-05-12 13:10:52 +02:00
chardev Clean up ill-advised or unusual header guards 2022-05-11 16:50:01 +02:00
crypto Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
disas disas: Remove old libopcode ppc disassembler 2022-05-09 08:21:05 +02:00
exec Clean up decorations and whitespace around header guards 2022-05-11 16:50:32 +02:00
fpu Clean up decorations and whitespace around header guards 2022-05-11 16:50:32 +02:00
hw machine: make memory-backend a link property 2022-05-12 12:29:44 +02:00
io QIOChannel: Add flags on io_writev and introduce io_flush callback 2022-05-16 13:56:24 +01:00
libdecnumber Replace config-time define HOST_WORDS_BIGENDIAN 2022-04-06 10:50:37 +02:00
migration migration: Remove load_state_old and minimum_version_id_old 2022-03-02 18:20:45 +00:00
monitor Move error_printf_unless_qmp() with monitor unit 2022-04-21 17:09:09 +04:00
net Replace config-time define HOST_WORDS_BIGENDIAN 2022-04-06 10:50:37 +02:00
qapi include: move qdict_{crumple,flatten} declarations 2022-04-21 17:03:51 +04:00
qemu * small cleanups for pc-bios/optionrom Makefiles 2022-05-12 10:52:15 -07:00
qom compiler.h: replace QEMU_SENTINEL with G_GNUC_NULL_TERMINATED 2022-03-22 14:40:51 +04:00
scsi scsi: inline sg_io_sense_from_errno() into the callers. 2021-03-06 11:42:56 +01:00
semihosting semihosting: Move include/hw/semihosting/ -> include/semihosting/ 2021-03-10 15:34:12 +00:00
standard-headers linux-headers: Update to v5.18-rc6 2022-05-13 08:20:11 -06:00
sysemu machine: use QAPI struct for boot configuration 2022-05-12 12:29:43 +02:00
tcg Normalize header guard symbol definition 2022-05-11 16:50:26 +02:00
ui Clean up ill-advised or unusual header guards 2022-05-11 16:50:01 +02:00
user Clean up decorations and whitespace around header guards 2022-05-11 16:50:32 +02:00
elf.h elf: Add machine type value for LoongArch 2021-12-21 13:17:06 -08:00
glib-compat.h compiler.h: replace QEMU_NORETURN with G_NORETURN 2022-04-21 17:03:51 +04:00
qemu-io.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qemu-main.h Simplify softmmu/main.c 2022-04-21 16:56:55 +04:00