diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2024-10-24 22:16:39 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-10-25 09:36:30 +0200 |
commit | 9e4615b40bfa7f1b692c3c3360d88a22c453b016 (patch) | |
tree | e3245ce48a49b01b192dfdbaeead18f6d18c04f8 /tcp_splice.c | |
parent | 149f457b23ed2cb196eed1b3f413b4a900f39547 (diff) | |
download | passt-9e4615b40bfa7f1b692c3c3360d88a22c453b016.tar passt-9e4615b40bfa7f1b692c3c3360d88a22c453b016.tar.gz passt-9e4615b40bfa7f1b692c3c3360d88a22c453b016.tar.bz2 passt-9e4615b40bfa7f1b692c3c3360d88a22c453b016.tar.lz passt-9e4615b40bfa7f1b692c3c3360d88a22c453b016.tar.xz passt-9e4615b40bfa7f1b692c3c3360d88a22c453b016.tar.zst passt-9e4615b40bfa7f1b692c3c3360d88a22c453b016.zip |
tcp_splice: fcntl(2) returns the size of the pipe, if F_SETPIPE_SZ succeeds
Don't report bogus failures (with --trace) just because the return
value is not zero.
Link: https://github.com/containers/podman/issues/24219
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tcp_splice.c')
-rw-r--r-- | tcp_splice.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tcp_splice.c b/tcp_splice.c index f112cfe..93f8bce 100644 --- a/tcp_splice.c +++ b/tcp_splice.c @@ -320,7 +320,7 @@ static int tcp_splice_connect_finish(const struct ctx *c, } if (fcntl(conn->pipe[sidei][0], F_SETPIPE_SZ, - c->tcp.pipe_size)) { + c->tcp.pipe_size) != (int)c->tcp.pipe_size) { flow_trace(conn, "cannot set %d->%d pipe size to %zu", sidei, !sidei, c->tcp.pipe_size); @@ -672,7 +672,7 @@ static void tcp_splice_pipe_refill(const struct ctx *c) continue; if (fcntl(splice_pipe_pool[i][0], F_SETPIPE_SZ, - c->tcp.pipe_size)) { + c->tcp.pipe_size) != (int)c->tcp.pipe_size) { trace("TCP (spliced): cannot set pool pipe size to %zu", c->tcp.pipe_size); } |