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

Matthieu Baerts posted 4 patches 4 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20231222-upstream-net-next-20231221-mptcp-currestab-v1-0-c1eb73d6b2b2@kernel.org
Maintainers: Matthieu Baerts <matttbe@kernel.org>, Mat Martineau <martineau@kernel.org>, Geliang Tang <geliang.tang@linux.dev>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>
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(-)
[PATCH net-next 0/4] mptcp: add CurrEstab MIB counter
Posted by Matthieu Baerts 4 months, 1 week ago
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>