From: Menglong Dong <imagedong@tencent.com>
In the 1th patch, we do some code cleanup with replease 'sock->sk'
with 'sk'. In the 2th patch, we add statistics for mptcp socket in
use. In the 3th patch, we make mptcp_connect can exit when receive
'SIGUSR1' with '-r' flag. And in the 4th patch, we add the testing
for this commit.
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 (4):
mptcp: introduce 'sk' to replace 'sock->sk' in mptcp_listen()
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 | 21 ++++++---
net/mptcp/protocol.h | 13 +++++
net/mptcp/subflow.c | 1 +
tools/testing/selftests/net/mptcp/diag.sh | 47 +++++++++++++++++--
.../selftests/net/mptcp/mptcp_connect.c | 4 +-
5 files changed, 72 insertions(+), 14 deletions(-)
--
2.37.2