From: Geliang Tang <geliang.tang@linux.dev>
To: David Ahern <dsahern@kernel.org>
Cc: Geliang Tang <geliang.tang@linux.dev>,
netdev@vger.kernel.org, mptcp@lists.linux.dev,
Matthieu Baerts <matttbe@kernel.org>
Subject: [PATCH iproute2-next] ss: mptcp: print out subflows_total counter
Date: Thu, 30 Nov 2023 19:40:36 +0800 [thread overview]
Message-ID: <ecf501dce539b4cc77e450d510c0414eec4bba7f.1701344289.git.geliang.tang@linux.dev> (raw)
A new counter mptcpi_subflows_total has been added in mptcpi_flags
to count the total amount of subflows from mptcp_info including the
initial one into kernel in this commit:
6ebf6f90ab4a ("mptcp: add mptcpi_subflows_total counter")
This patch prints out this counter into mptcp_stats output.
Acked-by: Matthieu Baerts <matttbe@kernel.org>
Signed-off-by: Geliang Tang <geliang.tang@linux.dev>
---
include/uapi/linux/mptcp.h | 1 +
misc/ss.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/include/uapi/linux/mptcp.h b/include/uapi/linux/mptcp.h
index 99b55575..c2e6f3be 100644
--- a/include/uapi/linux/mptcp.h
+++ b/include/uapi/linux/mptcp.h
@@ -55,6 +55,7 @@ struct mptcp_info {
__u64 mptcpi_bytes_sent;
__u64 mptcpi_bytes_received;
__u64 mptcpi_bytes_acked;
+ __u8 mptcpi_subflows_total;
};
/* MPTCP Reset reason codes, rfc8684 */
diff --git a/misc/ss.c b/misc/ss.c
index 7e67dbe4..67363ec0 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -3239,6 +3239,8 @@ static void mptcp_stats_print(struct mptcp_info *s)
out(" bytes_received:%llu", s->mptcpi_bytes_received);
if (s->mptcpi_bytes_acked)
out(" bytes_acked:%llu", s->mptcpi_bytes_acked);
+ if (s->mptcpi_subflows_total)
+ out(" subflows_total:%u", s->mptcpi_subflows_total);
}
static void mptcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r,
--
2.35.3
reply other threads:[~2023-11-30 11:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=ecf501dce539b4cc77e450d510c0414eec4bba7f.1701344289.git.geliang.tang@linux.dev \
--to=geliang.tang@linux.dev \
--cc=dsahern@kernel.org \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
/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).