diff options
| author | Stefano Brivio <sbrivio@redhat.com> | 2025-12-01 22:54:57 +0100 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2025-12-08 08:03:23 +0100 |
| commit | 920a479de40b58a81178e5d6e96c0eed30b992d5 (patch) | |
| tree | d35ef46eebe6feb3587d7989c4cbc179056e1151 /test/lib/git: | |
| parent | f423e12e98b4ad30e14f7b1ab259f36d75cb1c04 (diff) | |
| download | passt-920a479de40b58a81178e5d6e96c0eed30b992d5.tar passt-920a479de40b58a81178e5d6e96c0eed30b992d5.tar.gz passt-920a479de40b58a81178e5d6e96c0eed30b992d5.tar.bz2 passt-920a479de40b58a81178e5d6e96c0eed30b992d5.tar.lz passt-920a479de40b58a81178e5d6e96c0eed30b992d5.tar.xz passt-920a479de40b58a81178e5d6e96c0eed30b992d5.tar.zst passt-920a479de40b58a81178e5d6e96c0eed30b992d5.zip | |
tcp: Limit advertised window to available, not total sending buffer size
For non-local connections, we advertise the same window size as what
the peer in turn advertises to us, and limit it to the buffer size
reported via SO_SNDBUF.
That's not quite correct: in order to later avoid failures while
queueing data to the socket, we need to limit the window to the
available buffer size, not the total one.
Use the SIOCOUTQ ioctl and subtract the number of outbound queued
bytes from the total buffer size, then clamp to this value.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'test/lib/git:')
0 files changed, 0 insertions, 0 deletions
