[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230823-mptcp-issue-415-ss-mptcp-info-6-5-v1-1-fcaf00a03511@tessares.net>
Date: Wed, 23 Aug 2023 09:24:06 +0200
From: Matthieu Baerts <matthieu.baerts@...sares.net>
To: Stephen Hemminger <stephen@...workplumber.org>, netdev@...r.kernel.org
Cc: mptcp@...ts.linux.dev, Matthieu Baerts <matthieu.baerts@...sares.net>,
Paolo Abeni <pabeni@...hat.com>, Andrea Claudi <aclaudi@...hat.com>
Subject: [PATCH iproute2 1/3] ss: mptcp: display info counters as unsigned
Some counters from mptcp_info structure were stored as an unsigned
number (u8) but displayed as a signed one.
Even if it is unlikely these u8 counters -- number of subflows and
ADD_ADDR -- have a value bigger than 2^7, it still sounds better to
display them as unsigned.
Fixes: 9c3be2c0 ("ss: mptcp: add msk diag interface support")
Acked-by: Paolo Abeni <pabeni@...hat.com>
Acked-by: Andrea Claudi <aclaudi@...hat.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@...sares.net>
---
misc/ss.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/misc/ss.c b/misc/ss.c
index c71b08f9..34f82176 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -3232,17 +3232,17 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r,
static void mptcp_stats_print(struct mptcp_info *s)
{
if (s->mptcpi_subflows)
- out(" subflows:%d", s->mptcpi_subflows);
+ out(" subflows:%u", s->mptcpi_subflows);
if (s->mptcpi_add_addr_signal)
- out(" add_addr_signal:%d", s->mptcpi_add_addr_signal);
+ out(" add_addr_signal:%u", s->mptcpi_add_addr_signal);
if (s->mptcpi_add_addr_accepted)
- out(" add_addr_accepted:%d", s->mptcpi_add_addr_accepted);
+ out(" add_addr_accepted:%u", s->mptcpi_add_addr_accepted);
if (s->mptcpi_subflows_max)
- out(" subflows_max:%d", s->mptcpi_subflows_max);
+ out(" subflows_max:%u", s->mptcpi_subflows_max);
if (s->mptcpi_add_addr_signal_max)
- out(" add_addr_signal_max:%d", s->mptcpi_add_addr_signal_max);
+ out(" add_addr_signal_max:%u", s->mptcpi_add_addr_signal_max);
if (s->mptcpi_add_addr_accepted_max)
- out(" add_addr_accepted_max:%d", s->mptcpi_add_addr_accepted_max);
+ out(" add_addr_accepted_max:%u", s->mptcpi_add_addr_accepted_max);
if (s->mptcpi_flags & MPTCP_INFO_FLAG_FALLBACK)
out(" fallback");
if (s->mptcpi_flags & MPTCP_INFO_FLAG_REMOTE_KEY_RECEIVED)
--
2.40.1
Powered by blists - more mailing lists