netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/4] mptcp: add CurrEstab MIB counter
@ 2023-12-22 12:47 Matthieu Baerts
  2023-12-22 12:47 ` [PATCH net-next 1/4] mptcp: add CurrEstab MIB counter support Matthieu Baerts
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Matthieu Baerts @ 2023-12-22 12:47 UTC (permalink / raw)
  To: mptcp, Mat Martineau, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Shuah Khan, Geliang Tang
  Cc: netdev, linux-kernel, linux-kselftest, Matthieu Baerts

This MIB counter is similar to the one of TCP -- CurrEstab -- available
in /proc/net/snmp. This is useful to quickly list the number of MPTCP
connections without having to iterate over all of them.

Patch 1 prepares its support by adding new helper functions:

 - MPTCP_DEC_STATS(): similar to MPTCP_INC_STATS(), but this time to
   decrement a counter.

 - mptcp_set_state(): similar to tcp_set_state(), to change the state of
   an MPTCP socket, and to inc/decrement the new counter when needed.

Patch 2 uses mptcp_set_state() instead of directly calling
inet_sk_state_store() to change the state of MPTCP sockets.

Patch 3 and 4 validate the new feature in MPTCP "join" and "diag"
selftests.

Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
---
Geliang Tang (4):
      mptcp: add CurrEstab MIB counter support
      mptcp: use mptcp_set_state
      selftests: mptcp: join: check CURRESTAB counters
      selftests: mptcp: diag: check CURRESTAB counters

 net/mptcp/mib.c                                 |  1 +
 net/mptcp/mib.h                                 |  8 ++++
 net/mptcp/pm_netlink.c                          |  5 +++
 net/mptcp/protocol.c                            | 56 ++++++++++++++++---------
 net/mptcp/protocol.h                            |  1 +
 net/mptcp/subflow.c                             |  2 +-
 tools/testing/selftests/net/mptcp/diag.sh       | 17 +++++++-
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 46 +++++++++++++++++---
 8 files changed, 110 insertions(+), 26 deletions(-)
---
base-commit: 56794e5358542b7c652f202946e53bfd2373b5e0
change-id: 20231221-upstream-net-next-20231221-mptcp-currestab-5a2867b4020b

Best regards,
-- 
Matthieu Baerts <matttbe@kernel.org>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-01-02 13:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-22 12:47 [PATCH net-next 0/4] mptcp: add CurrEstab MIB counter Matthieu Baerts
2023-12-22 12:47 ` [PATCH net-next 1/4] mptcp: add CurrEstab MIB counter support Matthieu Baerts
2023-12-22 12:47 ` [PATCH net-next 2/4] mptcp: use mptcp_set_state Matthieu Baerts
2023-12-22 12:47 ` [PATCH net-next 3/4] selftests: mptcp: join: check CURRESTAB counters Matthieu Baerts
2023-12-22 12:47 ` [PATCH net-next 4/4] selftests: mptcp: diag: " Matthieu Baerts
2024-01-02 13:50 ` [PATCH net-next 0/4] mptcp: add CurrEstab MIB counter patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).