From: Geliang Tang <geliangtang@gmail.com>
To: mptcp@lists.linux.dev
Cc: Geliang Tang <geliangtang@gmail.com>
Subject: [MPTCP][PATCH v4 mptcp-next 4/5] mptcp: add the mibs for MP_FAIL
Date: Wed, 14 Jul 2021 18:41:56 +0800 [thread overview]
Message-ID: <5df5b6ba135e5951c40056689f885e5101dd1abd.1626258797.git.geliangtang@gmail.com> (raw)
In-Reply-To: <779edc1afc2f4622d9cffbdf3f8ccccfcdfd33cb.1626258797.git.geliangtang@gmail.com>
This patch added the mibs for MP_FAIL: MPTCP_MIB_MPFAILTX and
MPTCP_MIB_MPFAILRX.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
net/mptcp/mib.c | 2 ++
net/mptcp/mib.h | 2 ++
net/mptcp/options.c | 1 +
net/mptcp/pm.c | 1 +
net/mptcp/subflow.c | 1 +
5 files changed, 7 insertions(+)
diff --git a/net/mptcp/mib.c b/net/mptcp/mib.c
index ff2cc0e3273d..44d342c90121 100644
--- a/net/mptcp/mib.c
+++ b/net/mptcp/mib.c
@@ -44,6 +44,8 @@ static const struct snmp_mib mptcp_snmp_list[] = {
SNMP_MIB_ITEM("RmSubflow", MPTCP_MIB_RMSUBFLOW),
SNMP_MIB_ITEM("MPPrioTx", MPTCP_MIB_MPPRIOTX),
SNMP_MIB_ITEM("MPPrioRx", MPTCP_MIB_MPPRIORX),
+ SNMP_MIB_ITEM("MPFailTx", MPTCP_MIB_MPFAILTX),
+ SNMP_MIB_ITEM("MPFailRx", MPTCP_MIB_MPFAILRX),
SNMP_MIB_ITEM("RcvPruned", MPTCP_MIB_RCVPRUNED),
SNMP_MIB_SENTINEL
};
diff --git a/net/mptcp/mib.h b/net/mptcp/mib.h
index 0663cb12b448..0db62d5d4e38 100644
--- a/net/mptcp/mib.h
+++ b/net/mptcp/mib.h
@@ -37,6 +37,8 @@ enum linux_mptcp_mib_field {
MPTCP_MIB_RMSUBFLOW, /* Remove a subflow */
MPTCP_MIB_MPPRIOTX, /* Transmit a MP_PRIO */
MPTCP_MIB_MPPRIORX, /* Received a MP_PRIO */
+ MPTCP_MIB_MPFAILTX, /* Transmit a MP_FAIL */
+ MPTCP_MIB_MPFAILRX, /* Received a MP_FAIL */
MPTCP_MIB_RCVPRUNED, /* Incoming packet dropped due to memory limit */
__MPTCP_MIB_MAX
};
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index ed9a4a645459..9a2fa52c0bf0 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -1150,6 +1150,7 @@ bool mptcp_incoming_options(struct sock *sk, struct sk_buff *skb)
if (mp_opt.mp_fail) {
mptcp_pm_mp_fail_received(sk, mp_opt.fail_seq);
+ MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_MPFAILRX);
mp_opt.mp_fail = 0;
}
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index d4c19420194a..ccabe3b9e5ee 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -9,6 +9,7 @@
#include <net/tcp.h>
#include <net/mptcp.h>
#include "protocol.h"
+#include "mib.h"
/* path manager command handlers */
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 11a719fad718..5046ae431206 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -909,6 +909,7 @@ static enum mapping_status validate_data_csum(struct sock *ssk, struct sk_buff *
if (unlikely(csum_fold(csum))) {
MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_DATACSUMERR);
subflow->send_mp_fail = 1;
+ MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_MPFAILTX);
return subflow->mp_join ? MAPPING_INVALID : MAPPING_DUMMY;
}
--
2.31.1
next prev parent reply other threads:[~2021-07-14 10:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 10:41 [MPTCP][PATCH v4 mptcp-next 0/5] MP_FAIL support Geliang Tang
2021-07-14 10:41 ` [MPTCP][PATCH v4 mptcp-next 1/5] mptcp: MP_FAIL suboption sending Geliang Tang
2021-07-14 10:41 ` [MPTCP][PATCH v4 mptcp-next 2/5] mptcp: MP_FAIL suboption receiving Geliang Tang
2021-07-14 10:41 ` [MPTCP][PATCH v4 mptcp-next 3/5] mptcp: send out MP_FAIL when data checksum fail Geliang Tang
2021-07-14 10:41 ` Geliang Tang [this message]
2021-07-14 10:41 ` [MPTCP][PATCH v4 mptcp-next 5/5] selftests: mptcp: add MP_FAIL mibs check Geliang Tang
2021-07-15 1:46 ` [MPTCP][PATCH v4 mptcp-next 3/5] mptcp: send out MP_FAIL when data checksum fail Mat Martineau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5df5b6ba135e5951c40056689f885e5101dd1abd.1626258797.git.geliangtang@gmail.com \
--to=geliangtang@gmail.com \
--cc=mptcp@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).