aboutgitcodebugslistschat
path: root/tcp_splice.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-02-19 18:56:47 +1100
committerStefano Brivio <sbrivio@redhat.com>2024-02-27 12:52:14 +0100
commitaf303fdbff4910454de3414f47c1345a6d01065a (patch)
treef3266e95b9c574fcf54a9a4174de0c741798f75b /tcp_splice.c
parent4e08d9b9c6289ee00687203ce7a08106e9d45dc6 (diff)
downloadpasst-af303fdbff4910454de3414f47c1345a6d01065a.tar
passt-af303fdbff4910454de3414f47c1345a6d01065a.tar.gz
passt-af303fdbff4910454de3414f47c1345a6d01065a.tar.bz2
passt-af303fdbff4910454de3414f47c1345a6d01065a.tar.lz
passt-af303fdbff4910454de3414f47c1345a6d01065a.tar.xz
passt-af303fdbff4910454de3414f47c1345a6d01065a.tar.zst
passt-af303fdbff4910454de3414f47c1345a6d01065a.zip
tcp: Don't stop refilling socket pool if we find a filled entry
Currently tcp_sock_refill_pool() stops as soon as it finds an entry in the pool with a valid fd. This appears to makes sense: we always use fds from the front of the pool, so if we find a filled one, the rest of the pool should be filled as well. However, that's not quite correct. If a previous refill hit errors trying to open new sockets, it could leave gaps between blocks of valid fds. We're going to add some changes that could make that more likely. So, for robustness, instead skip over the filled entry but still try to refill the rest of the array. We expect simply iterating over the pool to be of small cost compared to even a single system call, so this shouldn't have much impact. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp_splice.c')
0 files changed, 0 insertions, 0 deletions