netsplice: use zero-copy if possible
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/engines/net.c b/engines/net.c
index a67432b..bc3946d 100644
--- a/engines/net.c
+++ b/engines/net.c
@@ -122,7 +122,7 @@
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 @@
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;