mirror of
https://passt.top/passt
synced 2025-05-25 18:45:37 +02:00
tcp_splice: A typo three years ago and SO_RCVLOWAT is gone
In commite5eefe7743
("tcp: Refactor to use events instead of states, split out spliced implementation"), this: if (!bitmap_isset(rcvlowat_set, conn - ts) && readlen > (long)c->tcp.pipe_size / 10) { (note the !) became: if (conn->flags & lowat_set_flag && readlen > (long)c->tcp.pipe_size / 10) { in the new tcp_splice_sock_handler(). We want to check, there, if we should set SO_RCVLOWAT, only if we haven't set it already. But, instead, we're checking if it's already set before we set it, so we'll never set it, of course. Fix the check and re-enable the functionality, which should give us improved CPU utilisation in non-interactive cases where we are not transferring at full pipe capacity. Fixes:e5eefe7743
("tcp: Refactor to use events instead of states, split out spliced implementation") Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
667caa09c6
commit
01b6a164d9
1 changed files with 1 additions and 1 deletions
|
@ -556,7 +556,7 @@ eintr:
|
|||
if (readlen >= (long)c->tcp.pipe_size * 10 / 100)
|
||||
continue;
|
||||
|
||||
if (conn->flags & lowat_set_flag &&
|
||||
if (!(conn->flags & lowat_set_flag) &&
|
||||
readlen > (long)c->tcp.pipe_size / 10) {
|
||||
int lowat = c->tcp.pipe_size / 4;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue