aboutsummaryrefslogtreecommitdiffstats
path: root/net/mptcp/pm_netlink.c
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2020-09-24 08:29:56 +0800
committerDavid S. Miller <davem@davemloft.net>2020-09-24 19:58:34 -0700
commit7a7e52e38a40f4f6ce8f06da601556a7669cf999 (patch)
tree240f5188ed880a907962d17c65a2c127a232853c /net/mptcp/pm_netlink.c
parentmptcp: implement mptcp_pm_remove_subflow (diff)
downloadlinux-dev-7a7e52e38a40f4f6ce8f06da601556a7669cf999.tar.xz
linux-dev-7a7e52e38a40f4f6ce8f06da601556a7669cf999.zip
mptcp: add RM_ADDR related mibs
This patch added two new mibs for RM_ADDR, named MPTCP_MIB_RMADDR and MPTCP_MIB_RMSUBFLOW, when the RM_ADDR suboption is received, increase the first mib counter, when the local subflow is removed, increase the second mib counter. Suggested-by: Matthieu Baerts <matthieu.baerts@tessares.net> Suggested-by: Paolo Abeni <pabeni@redhat.com> Suggested-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Geliang Tang <geliangtang@gmail.com> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/mptcp/pm_netlink.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index 9064c8098521..b33aebd85bd5 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -15,6 +15,7 @@
#include <uapi/linux/mptcp.h>
#include "protocol.h"
+#include "mib.h"
/* forward declaration */
static struct genl_family mptcp_genl_family;
@@ -346,6 +347,8 @@ void mptcp_pm_nl_rm_addr_received(struct mptcp_sock *msk)
msk->pm.subflows--;
WRITE_ONCE(msk->pm.accept_addr, true);
+ __MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_RMADDR);
+
break;
}
}
@@ -379,6 +382,8 @@ void mptcp_pm_nl_rm_subflow_received(struct mptcp_sock *msk, u8 rm_id)
msk->pm.local_addr_used--;
msk->pm.subflows--;
+ __MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_RMSUBFLOW);
+
break;
}
}