bpf: tcp: Get rid of st_bucket_done
authorJordan Rife <jordan@jrife.io>
Mon, 14 Jul 2025 18:09:07 +0000 (11:09 -0700)
committerMartin KaFai Lau <martin.lau@kernel.org>
Mon, 14 Jul 2025 19:09:09 +0000 (12:09 -0700)
commite25ab9b874a4bd8c6e3e5ce66cbe8a1dd4096e2e
treeae51b1b5ceaa558fe16e381633ae2fe39c88d69f
parentcdec67a489d4fdae3e83e04fca0419136a83c4c2
bpf: tcp: Get rid of st_bucket_done

Get rid of the st_bucket_done field to simplify TCP iterator state and
logic. Before, st_bucket_done could be false if bpf_iter_tcp_batch
returned a partial batch; however, with the last patch ("bpf: tcp: Make
sure iter->batch always contains a full bucket snapshot"),
st_bucket_done == true is equivalent to iter->cur_sk == iter->end_sk.

Signed-off-by: Jordan Rife <jordan@jrife.io>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
net/ipv4/tcp_ipv4.c