From: Jens Axboe Date: Fri, 22 Jun 2007 18:41:27 +0000 (+0200) Subject: netsplice: use zero-copy if possible X-Git-Tag: fio-1.16.6~5 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=4d94c275d2344b9231d9dc4585bd42b8e9fb7794 netsplice: use zero-copy if possible Signed-off-by: Jens Axboe --- diff --git a/engines/net.c b/engines/net.c index a67432bf..bc3946d5 100644 --- a/engines/net.c +++ b/engines/net.c @@ -122,7 +122,7 @@ static int vmsplice_io_u_out(struct thread_data *td, struct io_u *io_u, int bytes = 0; while (iov.iov_len) { - int ret = vmsplice(nd->pipes[0], &iov, 1, 0); + int ret = vmsplice(nd->pipes[0], &iov, 1, SPLICE_F_MOVE); if (ret < 0) { if (!bytes) @@ -153,7 +153,7 @@ static int vmsplice_io_u_in(struct thread_data *td, struct io_u *io_u) unsigned int bytes = 0; while (iov.iov_len) { - int ret = vmsplice(nd->pipes[1], &iov, 1, 0); + int ret = vmsplice(nd->pipes[1], &iov, 1, SPLICE_F_MOVE); if (ret < 0) return -1;