All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geliang Tang <geliang.tang@suse.com>
To: mptcp@lists.linux.dev
Cc: Geliang Tang <geliang.tang@suse.com>
Subject: [PATCH mptcp-next v8 6/8] mptcp: add mib for infinite map sending
Date: Fri, 29 Oct 2021 12:40:16 +0800	[thread overview]
Message-ID: <7f0fc192434a43191e70d7fbd02c377f3c1a87b4.1635481641.git.geliang.tang@suse.com> (raw)
In-Reply-To: <cover.1635481641.git.geliang.tang@suse.com>

This patch added a new mib named MPTCP_MIB_INFINITEMAPTX, increase it
when a infinite mapping has been sent out.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 net/mptcp/mib.c      | 1 +
 net/mptcp/mib.h      | 1 +
 net/mptcp/protocol.c | 1 +
 3 files changed, 3 insertions(+)

diff --git a/net/mptcp/mib.c b/net/mptcp/mib.c
index 3240b72271a7..c12251cb0d44 100644
--- a/net/mptcp/mib.c
+++ b/net/mptcp/mib.c
@@ -24,6 +24,7 @@ static const struct snmp_mib mptcp_snmp_list[] = {
 	SNMP_MIB_ITEM("MPJoinAckRx", MPTCP_MIB_JOINACKRX),
 	SNMP_MIB_ITEM("MPJoinAckHMacFailure", MPTCP_MIB_JOINACKMAC),
 	SNMP_MIB_ITEM("DSSNotMatching", MPTCP_MIB_DSSNOMATCH),
+	SNMP_MIB_ITEM("InfiniteMapTx", MPTCP_MIB_INFINITEMAPTX),
 	SNMP_MIB_ITEM("InfiniteMapRx", MPTCP_MIB_INFINITEMAPRX),
 	SNMP_MIB_ITEM("DSSNoMatchTCP", MPTCP_MIB_DSSTCPMISMATCH),
 	SNMP_MIB_ITEM("DataCsumErr", MPTCP_MIB_DATACSUMERR),
diff --git a/net/mptcp/mib.h b/net/mptcp/mib.h
index ecd3d8b117e0..7901f1338d15 100644
--- a/net/mptcp/mib.h
+++ b/net/mptcp/mib.h
@@ -17,6 +17,7 @@ enum linux_mptcp_mib_field {
 	MPTCP_MIB_JOINACKRX,		/* Received an ACK + MP_JOIN */
 	MPTCP_MIB_JOINACKMAC,		/* HMAC was wrong on ACK + MP_JOIN */
 	MPTCP_MIB_DSSNOMATCH,		/* Received a new mapping that did not match the previous one */
+	MPTCP_MIB_INFINITEMAPTX,	/* Sent an infinite mapping */
 	MPTCP_MIB_INFINITEMAPRX,	/* Received an infinite mapping */
 	MPTCP_MIB_DSSTCPMISMATCH,	/* DSS-mapping did not map with TCP's sequence numbers */
 	MPTCP_MIB_DATACSUMERR,		/* The data checksum fail */
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 70f2e0e212fa..2283efda1bc9 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1237,6 +1237,7 @@ static void mptcp_update_infinite_map(struct mptcp_sock *msk,
 	mpext->data_len = 0;
 	mpext->csum = 0;
 
+	MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_INFINITEMAPTX);
 	mptcp_subflow_ctx(ssk)->send_infinite_map = 0;
 	pr_fallback(msk);
 	__mptcp_do_fallback(msk);
-- 
2.26.2


  parent reply	other threads:[~2021-10-29  4:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29  4:40 [PATCH mptcp-next v8 0/8] The infinite mapping support Geliang Tang
2021-10-29  4:40 ` [PATCH mptcp-next v8 1/8] mptcp: don't send RST for single subflow Geliang Tang
2021-10-29  4:40 ` [PATCH mptcp-next v8 2/8] mptcp: add the fallback check Geliang Tang
2021-10-29  4:40 ` [PATCH mptcp-next v8 3/8] mptcp: track and update contiguous data status Geliang Tang
2021-10-29  4:40 ` [PATCH mptcp-next v8 4/8] mptcp: infinite mapping sending Geliang Tang
2021-10-29  4:40 ` [PATCH mptcp-next v8 5/8] mptcp: infinite mapping receiving Geliang Tang
2021-10-29  4:40 ` Geliang Tang [this message]
2021-10-29  4:40 ` [PATCH mptcp-next v8 7/8] selftests: mptcp: add infinite map mibs check Geliang Tang
2021-10-29  4:40 ` [PATCH mptcp-next v8 8/8] selftests: mptcp: add mp_fail testcases Geliang Tang
2021-10-29 10:02   ` Matthieu Baerts
2021-10-29 13:21     ` Geliang Tang
2021-10-29 14:43       ` Paolo Abeni
2021-10-29 19:51         ` Matthieu Baerts
2021-11-04  0:43   ` Mat Martineau
2021-11-04  9:14     ` Matthieu Baerts
2021-11-04 10:30       ` Geliang Tang
2021-11-04 11:48         ` Matthieu Baerts
2021-11-04 13:13           ` Geliang Tang
2021-11-04 13:50             ` Matthieu Baerts
2021-10-29  8:17 ` [PATCH mptcp-next v8 0/8] The infinite mapping support Paolo Abeni
2021-10-29 13:23   ` Geliang Tang
2021-11-05 13:05 ` Matthieu Baerts

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=7f0fc192434a43191e70d7fbd02c377f3c1a87b4.1635481641.git.geliang.tang@suse.com \
    --to=geliang.tang@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.