diff options
| author | Martin KaFai Lau <[email protected]> | 2021-07-01 13:06:00 -0700 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2021-07-23 16:44:53 -0700 |
| commit | b72acf4501d7c31e96749f0f5052b3bcb25fc2cb (patch) | |
| tree | 62d37a764adefd9125a16b2d6d046fb574d5ed19 /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | 62001372c2b6cdf2346afb2cf94ed3d950eee64c (diff) | |
tcp: seq_file: Add listening_get_first()
The current listening_get_next() is overloaded by passing
NULL to the 2nd arg, like listening_get_next(seq, NULL), to
mean get_first().
This patch moves some logic from the listening_get_next() into
a new function listening_get_first(). It will be equivalent
to the current established_get_first() and established_get_next()
setup. get_first() is to find a non empty bucket and return
the first sk. get_next() is to find the next sk of the current
bucket and then resorts to get_first() if the current bucket is
exhausted.
The next patch is to move the listener seq_file iteration from
listening_hash (port only) to lhash2 (port+addr).
Separating out listening_get_first() from listening_get_next()
here will make the following lhash2 changes cleaner and easier to
follow.
Signed-off-by: Martin KaFai Lau <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Acked-by: Kuniyuki Iwashima <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions