diff options
author | Geliang Tang <[email protected]> | 2023-11-28 15:18:45 -0800 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2023-11-29 20:06:17 -0800 |
commit | 6ebf6f90ab4ac09a76172a6d387e8819d3259595 (patch) | |
tree | 417b99fb849f32bf2bc6f5149ee5898af6a617ec /tools/testing/selftests/bpf/progs/test_autoload.c | |
parent | 3d6d7549042cbadf252fa32ee1561b5bd2f402ea (diff) |
mptcp: add mptcpi_subflows_total counter
If the initial subflow has been removed, we cannot know without checking
other counters, e.g. ss -ti <filter> | grep -c tcp-ulp-mptcp or
getsockopt(SOL_MPTCP, MPTCP_FULL_INFO, ...) (or others except MPTCP_INFO
of course) and then check mptcp_subflow_data->num_subflows to get the
total amount of subflows.
This patch adds a new counter mptcpi_subflows_total in mptcpi_flags to
store the total amount of subflows, including the initial one. A new
helper __mptcp_has_initial_subflow() is added to check whether the
initial subflow has been removed or not. With this helper, we can then
compute the total amount of subflows from mptcp_info by doing something
like:
mptcpi_subflows_total = mptcpi_subflows +
__mptcp_has_initial_subflow(msk).
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/428
Reviewed-by: Matthieu Baerts <[email protected]>
Signed-off-by: Geliang Tang <[email protected]>
Signed-off-by: Mat Martineau <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions