mbox series

[net-next,0/4] mptcp: add CurrEstab MIB counter

Message ID 20231222-upstream-net-next-20231221-mptcp-currestab-v1-0-c1eb73d6b2b2@kernel.org
Headers show
Series mptcp: add CurrEstab MIB counter | expand

Message

Matthieu Baerts (NGI0) Dec. 22, 2023, 12:47 p.m. UTC
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,

Comments

patchwork-bot+netdevbpf@kernel.org Jan. 2, 2024, 1:50 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Fri, 22 Dec 2023 13:47:21 +0100 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net-next,1/4] mptcp: add CurrEstab MIB counter support
    https://git.kernel.org/netdev/net-next/c/d9cd27b8cd19
  - [net-next,2/4] mptcp: use mptcp_set_state
    (no matching commit)
  - [net-next,3/4] selftests: mptcp: join: check CURRESTAB counters
    https://git.kernel.org/netdev/net-next/c/0bd962dd86b2
  - [net-next,4/4] selftests: mptcp: diag: check CURRESTAB counters
    https://git.kernel.org/netdev/net-next/c/81ab772819da

You are awesome, thank you!