summaryrefslogtreecommitdiff
path: root/net/unix/garbage.c
diff options
context:
space:
mode:
authorJordan Rife <jordan@jrife.io>2025-07-14 11:09:09 -0700
committerMartin KaFai Lau <martin.lau@kernel.org>2025-07-14 12:09:09 -0700
commitf5080f612a1c587bf636bb23d2a2f4de276d60e4 (patch)
tree73ace996945ed66273de2da6070bc43553e1cfff /net/unix/garbage.c
parentefeb820951ebf3778830256496ff72d00d135310 (diff)
bpf: tcp: Avoid socket skips and repeats during iteration
Replace the offset-based approach for tracking progress through a bucket in the TCP table with one based on socket cookies. Remember the cookies of unprocessed sockets from the last batch and use this list to pick up where we left off or, in the case that the next socket disappears between reads, find the first socket after that point that still exists in the bucket and resume from there. This approach guarantees that all sockets that existed when iteration began and continue to exist throughout will be visited exactly once. Sockets that are added to the table during iteration may or may not be seen, but if they are they will be seen exactly once. Signed-off-by: Jordan Rife <jordan@jrife.io> Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Diffstat (limited to 'net/unix/garbage.c')
0 files changed, 0 insertions, 0 deletions