mptcp: add MPJoinRejected MIB counter
This counter is useful to understand why some paths are rejected, and not created as expected. It is incremented when receiving a connection request, if the PM didn't allow the creation of new subflows. Reviewed-by: Geliang Tang <geliang@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20250413-net-next-mptcp-sched-mib-sft-misc-v2-5-0f83a4350150@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
60cbf31585
commit
4ce7fb8de5
@@ -28,6 +28,7 @@ static const struct snmp_mib mptcp_snmp_list[] = {
|
||||
SNMP_MIB_ITEM("MPJoinSynAckHMacFailure", MPTCP_MIB_JOINSYNACKMAC),
|
||||
SNMP_MIB_ITEM("MPJoinAckRx", MPTCP_MIB_JOINACKRX),
|
||||
SNMP_MIB_ITEM("MPJoinAckHMacFailure", MPTCP_MIB_JOINACKMAC),
|
||||
SNMP_MIB_ITEM("MPJoinRejected", MPTCP_MIB_JOINREJECTED),
|
||||
SNMP_MIB_ITEM("MPJoinSynTx", MPTCP_MIB_JOINSYNTX),
|
||||
SNMP_MIB_ITEM("MPJoinSynTxCreatSkErr", MPTCP_MIB_JOINSYNTXCREATSKERR),
|
||||
SNMP_MIB_ITEM("MPJoinSynTxBindErr", MPTCP_MIB_JOINSYNTXBINDERR),
|
||||
|
||||
@@ -23,6 +23,7 @@ enum linux_mptcp_mib_field {
|
||||
MPTCP_MIB_JOINSYNACKMAC, /* HMAC was wrong on SYN/ACK + MP_JOIN */
|
||||
MPTCP_MIB_JOINACKRX, /* Received an ACK + MP_JOIN */
|
||||
MPTCP_MIB_JOINACKMAC, /* HMAC was wrong on ACK + MP_JOIN */
|
||||
MPTCP_MIB_JOINREJECTED, /* The PM rejected the JOIN request */
|
||||
MPTCP_MIB_JOINSYNTX, /* Sending a SYN + MP_JOIN */
|
||||
MPTCP_MIB_JOINSYNTXCREATSKERR, /* Not able to create a socket when sending a SYN + MP_JOIN */
|
||||
MPTCP_MIB_JOINSYNTXBINDERR, /* Not able to bind() the address when sending a SYN + MP_JOIN */
|
||||
|
||||
@@ -3527,8 +3527,10 @@ bool mptcp_finish_join(struct sock *ssk)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!mptcp_pm_allow_new_subflow(msk))
|
||||
if (!mptcp_pm_allow_new_subflow(msk)) {
|
||||
MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_JOINREJECTED);
|
||||
goto err_prohibited;
|
||||
}
|
||||
|
||||
/* If we can't acquire msk socket lock here, let the release callback
|
||||
* handle it
|
||||
|
||||
@@ -247,6 +247,7 @@ again:
|
||||
|
||||
if (unlikely(req->syncookie)) {
|
||||
if (!mptcp_can_accept_new_subflow(subflow_req->msk)) {
|
||||
SUBFLOW_REQ_INC_STATS(req, MPTCP_MIB_JOINREJECTED);
|
||||
subflow_add_reset_reason(skb, MPTCP_RST_EPROHIBIT);
|
||||
return -EPERM;
|
||||
}
|
||||
@@ -902,6 +903,7 @@ create_child:
|
||||
}
|
||||
|
||||
if (!mptcp_can_accept_new_subflow(owner)) {
|
||||
SUBFLOW_REQ_INC_STATS(req, MPTCP_MIB_JOINREJECTED);
|
||||
subflow_add_reset_reason(skb, MPTCP_RST_EPROHIBIT);
|
||||
goto dispose_child;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user