Skip to content

mptcp: add statistics for mptcp socket in use

[email protected] mptcp 11 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v10 Latest6 patches 4 repliesIn review
  2. v9 posting 2/26 patches 5 repliesSuperseded
  3. v9 posting 1/20 of 5 patches 0 repliesSuperseded
Earlier versions · 8
VersionPostedPatchesRepliesStatus
v84 patches9 repliesSuperseded
v74 patches11 repliesSuperseded
v64 patches4 repliesSuperseded
v53 patches12 repliesSuperseded
v43 patches3 repliesSuperseded
v33 patches3 repliesSuperseded
v22 patches5 repliesSuperseded
v11 patch8 repliesSuperseded

Changes in v10 from the cover letter

- rename 'sk' to 'ssk' in the document of mptcp_token_new_connect()

Patches in v10 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6mptcp: introduce 'sk' to replace 'sock->sk' in mptcp_listen()net/mptcp/protocol.c+7 -60 replies
2/6mptcp: init sk->sk_prot in build_msk()net/mptcp/token_test.c+3 -00 replies
3/6mptcp: rename 'sk' to 'ssk' in mptcp_token_new_connect()net/mptcp/protocol.h net/mptcp/token.c+5 -50 replies
4/6mptcp: add statistics for mptcp socket in usenet/mptcp/protocol.c net/mptcp/token.c+17 -10 replies
5/6selftest: mptcp: exit from copyfd_io_poll() when receive SIGUSR1tools/testing/selftests/net/mptcp/mptcp_connect.c+2 -20 replies
6/6selftest: mptcp: add test for mptcp socket in usetools/testing/selftests/net/mptcp/diag.sh+51 -52 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPaolo Abeni
SeriesA-b
1/6
2/6
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v10 thread

Cover letter [PATCH mptcp-next v10 0/6] mptcp: add statistics for mptcp socket in use

From: Menglong Dong <[email protected]>

In the 1th patch, we do some code cleanup with replease 'sock->sk' with 'sk'. In the 2th patch, we rename 'sk' to 'ssk' in mptcp_token_new_connect(). In the 3th patch, we add statistics for mptcp socket in use. In the 4th patch, we init the 'sk_prot' field with tcp_prot in build_msk. In the 5th patch, we make mptcp_connect can exit when receive 'SIGUSR1' with '-r' flag. And in the 6th patch, we add the testing for this commit.

With the commit e8695e504942("mptcp: don't orphan ssk in mptcp_close()"), I belive that the testing of diag.sh can pass now. In fallback and simultaneous close case, the msk can't release normal (sometimes?) without that commit, and makes the testing fail. Enn...let's just see that the CI is saying~

Changes since v9:
- rename 'sk' to 'ssk' in the document of mptcp_token_new_connect()

Changes since v8:
- fix the panic caused by mptcp token KUNIT tests by init sk->sk_prot in build_msk()
- check the state of msk instead of ssk for listening socket

Changes since v7:
- remove the MPTCP_INUSE flag and do the statistics according to the creation and destruction of the token in the 2th patch.

Changes since v6:
- check all processes exit in flush_pids() in the 4th patch

Changes since v5:
- introduce MPTCP_INUSE flag to store if msk is in use, as I find that it's not correct to check is a msk is in use by !sk_unhashed(sk) in mptcp_destroy_common(), because the token can be release in mptcp_check_fastclose()
- add the 3th patch
- reuse __chk_nr in 4th patch

Changes since v4:
- rebase to solve merge conflict

Changes since v3:
- rename MPTCP_DESTROIED to MPTCP_DESTROYED in the 2th patch

Changes since v2:
- add testing

Changes since v1:
- split the code cleanup into the 1th patch.
- decrease the statistics for listening mptcp socket inuse with mptcp_listen_inuse_dec()
- add MPTCP_DESTROIED flags to store if mptcp_destroy_common() was called on the msk. For fallback case, we need to decrease the statistics only once, and mptcp_destroy_common() can be called more than once.

Menglong Dong (6):
mptcp: introduce 'sk' to replace 'sock->sk' in mptcp_listen()
mptcp: init sk->sk_prot in build_msk()
mptcp: rename 'sk' to 'ssk' in mptcp_token_new_connect()
mptcp: add statistics for mptcp socket in use
selftest: mptcp: exit from copyfd_io_poll() when receive SIGUSR1
selftest: mptcp: add test for mptcp socket in use

 net/mptcp/protocol.c                          | 25 ++++++---
 net/mptcp/protocol.h                          |  2 +-
 net/mptcp/token.c                             | 14 +++--
 net/mptcp/token_test.c                        |  3 +
 tools/testing/selftests/net/mptcp/diag.sh     | 56 +++++++++++++++++--
 .../selftests/net/mptcp/mptcp_connect.c       |  4 +-
 6 files changed, 85 insertions(+), 19 deletions(-)
Signature · 1 line
2.37.2