diff options
author | Paolo Abeni <pabeni@redhat.com> | 2021-08-13 15:15:46 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-14 11:37:25 +0100 |
commit | fc1b4e3b6274379a1ed398e19b850561ccd765db (patch) | |
tree | caab6c9096f24c0a7fa52adb4e569ba7bfc647ae /net/mptcp | |
parent | ff5a0b421cb23bf6b2898939ffef5b683045d9d3 (diff) | |
download | linux-stable-fc1b4e3b6274379a1ed398e19b850561ccd765db.tar.gz linux-stable-fc1b4e3b6274379a1ed398e19b850561ccd765db.tar.bz2 linux-stable-fc1b4e3b6274379a1ed398e19b850561ccd765db.zip |
mptcp: add mibs for stale subflows processing
This allows monitoring exceptional events like
active backup scenarios.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp')
-rw-r--r-- | net/mptcp/mib.c | 2 | ||||
-rw-r--r-- | net/mptcp/mib.h | 2 | ||||
-rw-r--r-- | net/mptcp/pm.c | 2 | ||||
-rw-r--r-- | net/mptcp/pm_netlink.c | 1 | ||||
-rw-r--r-- | net/mptcp/protocol.c | 1 |
5 files changed, 8 insertions, 0 deletions
diff --git a/net/mptcp/mib.c b/net/mptcp/mib.c index ff2cc0e3273d..3a7c4e7b2d79 100644 --- a/net/mptcp/mib.c +++ b/net/mptcp/mib.c @@ -45,6 +45,8 @@ static const struct snmp_mib mptcp_snmp_list[] = { SNMP_MIB_ITEM("MPPrioTx", MPTCP_MIB_MPPRIOTX), SNMP_MIB_ITEM("MPPrioRx", MPTCP_MIB_MPPRIORX), SNMP_MIB_ITEM("RcvPruned", MPTCP_MIB_RCVPRUNED), + SNMP_MIB_ITEM("SubflowStale", MPTCP_MIB_SUBFLOWSTALE), + SNMP_MIB_ITEM("SubflowRecover", MPTCP_MIB_SUBFLOWRECOVER), SNMP_MIB_SENTINEL }; diff --git a/net/mptcp/mib.h b/net/mptcp/mib.h index 0663cb12b448..8ec16c991aac 100644 --- a/net/mptcp/mib.h +++ b/net/mptcp/mib.h @@ -38,6 +38,8 @@ enum linux_mptcp_mib_field { MPTCP_MIB_MPPRIOTX, /* Transmit a MP_PRIO */ MPTCP_MIB_MPPRIORX, /* Received a MP_PRIO */ MPTCP_MIB_RCVPRUNED, /* Incoming packet dropped due to memory limit */ + MPTCP_MIB_SUBFLOWSTALE, /* Subflows entered 'stale' status */ + MPTCP_MIB_SUBFLOWRECOVER, /* Subflows returned to active status after being stale */ __MPTCP_MIB_MAX }; diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c index d8a85fe92360..0ed3e565f8f8 100644 --- a/net/mptcp/pm.c +++ b/net/mptcp/pm.c @@ -10,6 +10,8 @@ #include <net/mptcp.h> #include "protocol.h" +#include "mib.h" + /* path manager command handlers */ int mptcp_pm_announce_addr(struct mptcp_sock *msk, diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index c0eb14e05bea..ac0aa6faacfa 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -923,6 +923,7 @@ void mptcp_pm_nl_subflow_chk_stale(const struct mptcp_sock *msk, struct sock *ss if (!tcp_rtx_and_write_queues_empty(ssk)) { subflow->stale = 1; __mptcp_retransmit_pending_data(sk); + MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_SUBFLOWSTALE); } unlock_sock_fast(ssk, slow); diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 18d3adccba5c..22214a58d892 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -1397,6 +1397,7 @@ void mptcp_subflow_set_active(struct mptcp_subflow_context *subflow) return; subflow->stale = 0; + MPTCP_INC_STATS(sock_net(mptcp_subflow_tcp_sock(subflow)), MPTCP_MIB_SUBFLOWRECOVER); } bool mptcp_subflow_active(struct mptcp_subflow_context *subflow) |