From patchwork Wed Aug 23 07:24:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13361732 X-Patchwork-Delegate: stephen@networkplumber.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 30EF5946E for ; Wed, 23 Aug 2023 07:24:27 +0000 (UTC) Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F44FF3 for ; Wed, 23 Aug 2023 00:24:26 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-31aeee69de0so3302110f8f.2 for ; Wed, 23 Aug 2023 00:24:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1692775465; x=1693380265; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=WevOLFXl/2i1NIjOjgq+04LHQEgQNZPLNt/G1BCNMf0=; b=U4eVV2so3IUROV54x/3kMVua03DAmJXJpqPZmrgpQCOIWpHOmZRvgBiAb2o9xrxqx/ LpQU58/vqNkUeNV2dX+j2iAgnX/A9qE/SM3yV6S5CxtI4GN4mqWQ8hApdJfOVx7zATPr ElNtTZwvBDJE29u7ZyCZnub5aSkdZmNlhxFSbXfhElBkwPhd/M3qsrI8djZgOoe4iQj6 f5OzFHtGFd1rUOseBKp11Vpb6EGX7PWORsPqPAOqy7+NzsooPIF7/uhBGfQSa9c5MErK 31mMlqj+lG3jqMGyW1dYIaGeovm8Tey92KWqz3XVbf59/OAJkieqVYGKSMbjs59DkAkF CiyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692775465; x=1693380265; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WevOLFXl/2i1NIjOjgq+04LHQEgQNZPLNt/G1BCNMf0=; b=CeSmGJ1SFLheJyQ7XgLAMBfU22ppQLWDdu1PH63CNNN320LFiZa+Lov2sswrF0F+mg TIKGpjxWxuNuJNKgSFYOXemf5lbZF244sT7W5hG+4iWFPcoylSIFOIApDHoQe2zHoZDh pWbegPmNUy3Y17Fcjm1UDzR/O1YznivTYetfqK+wdX88tzSgFNfRSA45b5UBaOaor/NT JrrjqXjO4pg8IFozdsKkedEy+0vjcarPyc1piWUxhuhCc35Vd43VKofqsqkSzPAgcvUb J/LPphB9B6pCjDncFSqWZim1q3Iw1AhW/4Jzsbz6mZ2ny04Bet0zvhgRqCZKWJLRp/XA o4eQ== X-Gm-Message-State: AOJu0Yzes9xRHWz7xje9d3sjjVvy2RJWS0iWY9pdNd6XVzZgGAFBMHlM kCmKHLjGcZpMXrCRSvHLG8XsEA== X-Google-Smtp-Source: AGHT+IHmczGIUZK3mIj2s5mua2NpDLGvwyTP49zuM+K6N9loKJri/M/EcCAz+P1L7Vnjn7GqIw2CUA== X-Received: by 2002:a5d:480c:0:b0:319:55a5:3435 with SMTP id l12-20020a5d480c000000b0031955a53435mr8813117wrq.64.1692775464760; Wed, 23 Aug 2023 00:24:24 -0700 (PDT) Received: from vdi08.nix.tessares.net (static.219.156.76.144.clients.your-server.de. [144.76.156.219]) by smtp.gmail.com with ESMTPSA id e10-20020a5d594a000000b003140f47224csm17975418wri.15.2023.08.23.00.24.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 00:24:24 -0700 (PDT) From: Matthieu Baerts Date: Wed, 23 Aug 2023 09:24:06 +0200 Subject: [PATCH iproute2 1/3] ss: mptcp: display info counters as unsigned Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20230823-mptcp-issue-415-ss-mptcp-info-6-5-v1-1-fcaf00a03511@tessares.net> References: <20230823-mptcp-issue-415-ss-mptcp-info-6-5-v1-0-fcaf00a03511@tessares.net> In-Reply-To: <20230823-mptcp-issue-415-ss-mptcp-info-6-5-v1-0-fcaf00a03511@tessares.net> To: Stephen Hemminger , netdev@vger.kernel.org Cc: mptcp@lists.linux.dev, Matthieu Baerts , Paolo Abeni , Andrea Claudi X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1919; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=vecf6tLbR0awOgwcnlMZ2IJU00x2CO7EBpwaOMAYH40=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBk5bQkA6/aXA/o9Q7ef23/q6DnzcQDsJd53NSrt GDEuP2M88GJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZOW0JAAKCRD2t4JPQmmg c5nfEADfV+jsOt/z99a9BrFvIkgbaLMdTSJpkQXo8/GbQs2NAlwpXrUOo1hrzQ/Q8Dd3Jn7Dqc5 nQZ0fAdg7gEDJaEwyZW0ahy4bEzBXTrbL5ly8UjONg9EduX7+Zk19yu9UvudiRZoOCVDBuJ/PCg tO/6kwCGigMbJ2noqs7iva+xC5cC3zFtou/33/+4nTrxjXvP+2JdjBsq3RdkesQDtmxczGTZiHv kci3PUfQdP4MOV3ZTLI8mARN8EgKER5+g8VySQ4W9rI5+aifOGCRqLgqNAJhI3GUOmIknhnU9OJ I6ECZoNtWvsTzG4EbZ687vbLW7xmkm7y30xKxE5GOA4QAvkNNjIL8HbU1vMi/RTcENY6NqN5h7/ IfA5bqbdSrcdoOyYgQDradLby3Q2v6bc3OfCO67rGh8Jh8w5X9DfWiTsNL/5u7c8nfhuBETcBJD KhO+L1SURpwvnZmrowZZagoG8hhAACCtttIqI5Ne0XqEt6TW0tsoMRbn7UOkPvhwsOBCX+6Ww2V wxlZHUfgBE+qP/zE1MzvBE4V2hDq99nVLoN+GwtTnDoDiNFT1PWGBEanIZFjI3Ox6a9uF0K6Ygu hau4HvfXgyLHOjeGEoqFvfA4lYiAcCakuKY1Ot/P46mpkIitgnBmXIa5yPt4hUJ0eFXgElEZta2 Z5X8cSGVhNNnGmw== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: dsahern@gmail.com 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 Acked-by: Andrea Claudi Signed-off-by: Matthieu Baerts --- 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) From patchwork Wed Aug 23 07:24:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13361733 X-Patchwork-Delegate: stephen@networkplumber.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA0BF8BEA for ; Wed, 23 Aug 2023 07:24:29 +0000 (UTC) Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45AB3F3 for ; Wed, 23 Aug 2023 00:24:28 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-50078eba7afso5324915e87.0 for ; Wed, 23 Aug 2023 00:24:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1692775466; x=1693380266; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Xk88FLEvdheX2fQPNktcYYYOPUp9QaORQSzAgtkIwG8=; b=eZLbwyyjmFE9caPXGyk9wZvJ64gT0Otek+R7WS3lRUWZt/ESfP5FOGci0zG+BPzhlH VBJqePJK0amOhRjq6zok0cUI7WlteNmh2ERMQOWiZgwp2rtyRyyO7AicbKwmXxgJCpTj kiM+H1zncIjuTCqVK2yO4HSvdYNf2LdmEy44YZJXiKOq1NyYY2fnFW9SPzFdvNAAPee1 Ovd4gXgG3/6toFxIUo+iF/m2Sqcu6NUOEbTyDfVuATJNfH5LIjMRYGQz8bQWnpdGFA0R CG5FGpHQhUGd1Y3SBJN83Di5C1EKuur9vU+6mu9X5HuYGEl8NfNaRk2wT1kTSBmgn4NF hKAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692775466; x=1693380266; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xk88FLEvdheX2fQPNktcYYYOPUp9QaORQSzAgtkIwG8=; b=TBW2FyWTDU5Lohxtr6JdUaK0rbILaYZkzDfmj5mdNRlx2YEuoMi2nnHQLeqJ/ARPF4 tdsGCWb1JQ8pRfuEE19Tl1m+b9ax5WgcqUSQgYWIXH+Tx8Br2BA+ZWkpyovLXy0UtOxY 5f7VjhQi0hIsgeEdX/e1L6MwulanTFdp0fR0W+ltgSTdWqWzMKh39DnmZgVRZGVmL61Q fu02xMRAdelXP1VHN07XmqjPrBnzLK7JpqEVnzsoeOj2DC9iv1/f9hLqvCbVpk1pNhsy OG7LFhjkeC4jAHMBbylmFxthekKoLlSLZj5Gl49/tdnK+DFjkKwGTK55rMSxA3Ui580A 0Bvg== X-Gm-Message-State: AOJu0YwHY43UxkkXFVd4+mzGtNaB4coE63zhaDDKtsDp1s5CJtettqJe KcfI0KZyzc2B5mDZYIp9DR+RnA== X-Google-Smtp-Source: AGHT+IFFRukbMWljQM/oTprnPna+4vPTuLC1n1cKjbww/D5CIS9gavPhpnbZgTCwXCwkUVEY2sIKTA== X-Received: by 2002:a05:6512:33ca:b0:4fb:8616:7a03 with SMTP id d10-20020a05651233ca00b004fb86167a03mr10149648lfg.4.1692775466384; Wed, 23 Aug 2023 00:24:26 -0700 (PDT) Received: from vdi08.nix.tessares.net (static.219.156.76.144.clients.your-server.de. [144.76.156.219]) by smtp.gmail.com with ESMTPSA id e10-20020a5d594a000000b003140f47224csm17975418wri.15.2023.08.23.00.24.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 00:24:25 -0700 (PDT) From: Matthieu Baerts Date: Wed, 23 Aug 2023 09:24:07 +0200 Subject: [PATCH iproute2 2/3] ss: mptcp: display seq related counters as decimal Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20230823-mptcp-issue-415-ss-mptcp-info-6-5-v1-2-fcaf00a03511@tessares.net> References: <20230823-mptcp-issue-415-ss-mptcp-info-6-5-v1-0-fcaf00a03511@tessares.net> In-Reply-To: <20230823-mptcp-issue-415-ss-mptcp-info-6-5-v1-0-fcaf00a03511@tessares.net> To: Stephen Hemminger , netdev@vger.kernel.org Cc: mptcp@lists.linux.dev, Matthieu Baerts , Paolo Abeni , Andrea Claudi X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1344; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=aPMCGBRNNu8FR+HlpeKtrb2of0i6DIq6dP00GRu4wAM=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBk5bQlVbXG5hGqZnfk0pruaQ1KIdL1dZ9Smlfw+ 8Lo3CiaQ6iJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZOW0JQAKCRD2t4JPQmmg c5QQD/9jvH067R6OBwwtUcEs8GhVYUjTeJBgq9Nmjls9KCR6kENs89eMGkQYxHcRhvnL6fy2tEP RIgDHTToeCbQAbJ/vjiZox6PFcIldmljkYrA0ORkNYzsnwpSs0qsrmkNdXlRHeaobS2VcB6LvRI Ij+H5iqnQG39iM9uyA5c07I7ZNrKY8JjVwdIVV0JrbhbLp6tZnEJK8ImH7wckZ35wtixzN+4KID LqHy4+MhzTp2w9hC6/V8uks+buYoGyYxOMTGLufaSNLZS4G8ZaVoTMkear23WLPM1oUIav0ryuT I43WDi4/+Y/g+E1NrOjgZxtbqOYlNnukww7qInOxNaqysvl114A3jconozSBk36oyAVJSidjVV9 5RPR8hYKJzGc4DGyHSYVkP80SnSoHJZ0VCbOETDkIw+ktlJtoTAHvbMheT4jZtrkjNN4+4hOJTp wm1nc/BvwLgR3e7mq8v3IlFTildhYVXh/koi/AWVyX8MpCh6JXaa7PSxFA9OUXwpyzx6i1hcWCu TfIczvcw3BKb76VZh0hsvuNfVG8qG8CI+kVLS1OiwUzjdmPVunmtsg/4T+vzj62liOBkjrthHWa lZcowN4X1v6L5lHl9YJwASdaOmmOYYnZWHvqMgUYgn4odOkMcHriWRXEaNQ1HP3/XBROt+7UElu MV6cSHqI5k03Rqw== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: dsahern@gmail.com This is aligned with what is printed for TCP sockets. The main difference here is that these counters can be larger (u32 vs u64) but WireShark and TCPDump are also printing these MPTCP counters as decimal and they look fine. So it sounds better to do the same here with ss for those who want to easily count how many bytes have been exchanged between two runs without having to think in hexa. Acked-by: Paolo Abeni Acked-by: Andrea Claudi Signed-off-by: Matthieu Baerts --- misc/ss.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 34f82176..d1779b1d 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -3250,11 +3250,11 @@ static void mptcp_stats_print(struct mptcp_info *s) if (s->mptcpi_token) out(" token:%x", s->mptcpi_token); if (s->mptcpi_write_seq) - out(" write_seq:%llx", s->mptcpi_write_seq); + out(" write_seq:%llu", s->mptcpi_write_seq); if (s->mptcpi_snd_una) - out(" snd_una:%llx", s->mptcpi_snd_una); + out(" snd_una:%llu", s->mptcpi_snd_una); if (s->mptcpi_rcv_nxt) - out(" rcv_nxt:%llx", s->mptcpi_rcv_nxt); + out(" rcv_nxt:%llu", s->mptcpi_rcv_nxt); } static void mptcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r, From patchwork Wed Aug 23 07:24:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13361734 X-Patchwork-Delegate: stephen@networkplumber.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 269538BF6 for ; Wed, 23 Aug 2023 07:24:30 +0000 (UTC) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4257133 for ; Wed, 23 Aug 2023 00:24:29 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-50078eba7afso5324954e87.0 for ; Wed, 23 Aug 2023 00:24:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1692775468; x=1693380268; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=GqALlOGxkqWLp7QsNDng1dKla6oJzZP+TsYhQ5UK3Jk=; b=1mDgEA2EmoZjWYy4JTLRceF9KtFcsz61CJymGV6691SJuyH3BTHQYqAv7jDybqU87i ZAYd4Cl1KcB+pxcFFbYeN5N8/MB3dkK27O5x+4yyvrVDG+1bwGlmbYkcHEoShanMF/1l dVhBdciD1F5lauJy58fa15eC+igpOXoI/K8+/vvZ8AN4AJsW1PB3htA2OTmBQ98Wr18/ tUNIoH5GSTNEOernLJEqRYcYZL4v8nxLXrRffMjiSsYRzZjt/e6TSvqqlDBMM65L+ChU 1ywDAWqHhAgnex/SyQxCaW66qOCWc/U3hQv9chkWYO53ErGfFLJGZsX2kucsrteT38eN y1dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692775468; x=1693380268; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GqALlOGxkqWLp7QsNDng1dKla6oJzZP+TsYhQ5UK3Jk=; b=QELmsYo2sAoGLkE0flGEV3e7KSpY7yDjIxrhzpRG6RhWMfkNtTYNfcwq66AsMMFIWN k0puULxAuVKWI53bUmOwWF7n6HTvQMZ/c2hIcQRf8jvxOIXHeuBHEkbtsxaNuK5QPVoL /F4ao9R2hnpTEWJAF8mf50v7sGuoa2Us0baSKEH+2Fb3hv9kU6Bn4scEHDPG3J0Cwt68 u2JAfLXe28C1AN+h9bJ/L5V5ONN22Bdk83xQ4k81vu+dOECgMcBXWJTQcpEirE7juTZY 91yMVCjCCz7t0ay78twWcza+EPFIRxApmPzLgw8gfFfbqULAlMx+TN1woT5/KUsao22q jUHQ== X-Gm-Message-State: AOJu0YxsRKz3hklZBTE9oNLzuJoT6RCcxn6Tr9EaOiHHwwnMpqBBwM9k 3+U4SMdYxE2IiPnjJHPNuXaayw== X-Google-Smtp-Source: AGHT+IEwr84qm9yaaMBxqazzqnNDqbHNSVaV8l16ViTFku2wPS4JJNmQQctEoDNhnkU9txqJJNcuDg== X-Received: by 2002:a05:6512:2512:b0:4fe:af1:c3ae with SMTP id be18-20020a056512251200b004fe0af1c3aemr8942846lfb.15.1692775468200; Wed, 23 Aug 2023 00:24:28 -0700 (PDT) Received: from vdi08.nix.tessares.net (static.219.156.76.144.clients.your-server.de. [144.76.156.219]) by smtp.gmail.com with ESMTPSA id e10-20020a5d594a000000b003140f47224csm17975418wri.15.2023.08.23.00.24.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 00:24:27 -0700 (PDT) From: Matthieu Baerts Date: Wed, 23 Aug 2023 09:24:08 +0200 Subject: [PATCH iproute2 3/3] ss: mptcp: print missing info counters Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20230823-mptcp-issue-415-ss-mptcp-info-6-5-v1-3-fcaf00a03511@tessares.net> References: <20230823-mptcp-issue-415-ss-mptcp-info-6-5-v1-0-fcaf00a03511@tessares.net> In-Reply-To: <20230823-mptcp-issue-415-ss-mptcp-info-6-5-v1-0-fcaf00a03511@tessares.net> To: Stephen Hemminger , netdev@vger.kernel.org Cc: mptcp@lists.linux.dev, Matthieu Baerts , Paolo Abeni , Andrea Claudi X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1667; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=/OFZjX2EyDXdp6wHxgIF2qZHWHzH+QXRp45KKKVz1AA=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBk5bQlgR2MWecvXklalSonBevXFc0vsQ6Yh8U7J ewtBvsg7FOJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZOW0JQAKCRD2t4JPQmmg cwOlEACGG6bmf2dREneYhBZAZG88tAMo8rJvJr8EDgDZC+wjbSfQEdz0eXkHZAPPTx7VcZ8JXwD MJktNDAcDTXZhzNeItnl2WFN0XHOyzZJh8avJOTJUDi8Gm32gZmD4ikXI/fGMhlgYzwpsmV7YGW cvALM8eIKIIhQQpBB/OyongsV6/XI/6mr5MtMkMkZ/B3XHSCFNtmEhBfdgbSBalAxUph3fv38ri 3kdL7vY3ujXVNmK5A7eJyGSGg3c309B6QeQeopG3R5XtRGpxGlwftNe7uuWKPJu0YsqCD78robW VbXnbbpYEiFbwVOdpyM1QXSg3HdB62xfgpZIZFeaN3R9ZsjBMTf4djtXAFZd2CxQ4CglpiIb7u9 NNafGCZbFUEMu1lFWHNWsRoXwheezaAbsDEJ8oSu9IA30iA1/m62VywCiqujZEcX33htnpKOp3+ yGM8QoTPMAxxe0P2w6Av1EtDEa1ynhvPY5dvscxMxMa1HC9bdsqhwAz9XYOfd4yPhwIQdgeeZA8 PFYLrXk+2pLv5JszIdITOkYpXNRoIVTsdeHJRjE7lHm8fdx7q75CPUn3b8hTZXKmsnGTmFsam5L 4BEjaG/mYWBNbNgLFM5SmJzj0qdtojVWn6esNt8M54wk6ZKK04jmz0Ak4RNeaXDztOELycGeAQ0 Ba0DnVYpYPWTdFg== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: dsahern@gmail.com These new counters have been added in different kernel versions: - v5.12: local_addr_used, local_addr_max - v5.13: csum_enabled - v6.5: retransmits, bytes_retrans, bytes_sent, bytes_received, bytes_acked It is interesting to display them if they are available. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/415 Acked-by: Paolo Abeni Acked-by: Andrea Claudi Signed-off-by: Matthieu Baerts --- misc/ss.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/misc/ss.c b/misc/ss.c index d1779b1d..9a6188bb 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -3255,6 +3255,22 @@ static void mptcp_stats_print(struct mptcp_info *s) out(" snd_una:%llu", s->mptcpi_snd_una); if (s->mptcpi_rcv_nxt) out(" rcv_nxt:%llu", s->mptcpi_rcv_nxt); + if (s->mptcpi_local_addr_used) + out(" local_addr_used:%u", s->mptcpi_local_addr_used); + if (s->mptcpi_local_addr_max) + out(" local_addr_max:%u", s->mptcpi_local_addr_max); + if (s->mptcpi_csum_enabled) + out(" csum_enabled:%u", s->mptcpi_csum_enabled); + if (s->mptcpi_retransmits) + out(" retransmits:%u", s->mptcpi_retransmits); + if (s->mptcpi_bytes_retrans) + out(" bytes_retrans:%llu", s->mptcpi_bytes_retrans); + if (s->mptcpi_bytes_sent) + out(" bytes_sent:%llu", s->mptcpi_bytes_sent); + if (s->mptcpi_bytes_received) + out(" bytes_received:%llu", s->mptcpi_bytes_received); + if (s->mptcpi_bytes_acked) + out(" bytes_acked:%llu", s->mptcpi_bytes_acked); } static void mptcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r,