summaryrefslogtreecommitdiff
path: root/include/qemu/iov.h
AgeCommit message (Collapse)AuthorFilesLines
2017-09-05tests: Use real size for iov testsJuan Quintela1-6/+0
We were using -1 instead of the real size because the functions check what is bigger, size in bytes or the size of the iov. Recent gcc's barf at this. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Tested-by: Cleber Rosa <crosa@redhat.com> -- Remove comments about this feature. Fix missing -1.
2016-03-22include/qemu/iov.h: Don't include qemu-common.hMarkus Armbruster1-2/+28
qemu-common.h should only be included by .c files. Its file comment explains why: "No header file should depend on qemu-common.h, as this would easily lead to circular header dependencies." qemu/iov.h includes qemu-common.h for QEMUIOVector stuff. Move all that to qemu/iov.h and drop the ill-advised include. Include qemu/iov.h where the QEMUIOVector stuff is now missing. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-02-09iov: avoid memcpy for "simple" iov_from_buf/iov_to_bufPaolo Bonzini1-4/+30
memcpy can take a large amount of time for small reads and writes. For virtio it is a common case that the first iovec can satisfy the whole read or write. In that case, and if bytes is a constant to avoid excessive growth of code, inline the first iteration into the caller. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1450782213-14227-1-git-send-email-pbonzini@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-06-23iov: don't touch iov in iov_send_recv()Wen Congyang1-1/+1
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Message-id: 555D39D2.4000705@cn.fujitsu.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-02iov: add iov_discard_front/back() to remove dataStefan Hajnoczi1-0/+13
The iov_discard_front/back() functions remove data from the front or back of the vector. This is useful when peeling off header/footer structs. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2012-12-19misc: move include files to include/qemu/Paolo Bonzini1-0/+102
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>