From nobody Mon Oct 14 08:20:38 2024 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E07278BEA for ; Wed, 23 Aug 2023 07:24:26 +0000 (UTC) Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-40057e09bbaso673245e9.3 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=cF7TYnhJOJ5SqPXdryA8Euls1bCe5PQePkusgd9mA9fazLZldgmGXFwr+91YIgHm2D Y8ksvrGtczQ06445rh4Y6xxaYh8j4ICvzHD0ijpSWS9naCwwPa+ngW8sMEco8KmEfb+1 OmsL42/FPVqEwzo49BHN/wu/ZCMSA5QwaFdoucZea30KgoMazVMESq6OpUx4hLFLad5a 7Wy6qNp/T5TikyY3tYPBoQHHGJ4YfhxexMwbToCsGf80QezkeHn1Hv+gaNbZFkvpjur2 PKWP+9qzpn+yBxN/FDW9eVK/CALeEnDdEvwFHjkT9FvmaVKWFK6DtPf4cajo7ib4CayA X+gw== X-Gm-Message-State: AOJu0YwdT0VJeZmP/R3z+O+BBrl92bt5kxa7OnRnXUpj7DsRcnnNi7RZ 4h93SVU+dfGNfY91Hlk8pEKKeQ== 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: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 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 *nl= h, 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) --=20 2.40.1 From nobody Mon Oct 14 08:20:38 2024 Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9F9FA924 for ; Wed, 23 Aug 2023 07:24:28 +0000 (UTC) Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-4ff8cf11b90so8288452e87.1 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=XiDmgRRIX+iAPB9Ij8OWFsf9LCcUqnVGV0bj2C3Fzi6MuoUqIAKcyJ53vnNMVv8e7H sK0xhAIHiSyKr+98bidFbp9HAGrfEN6Gmog6SURHNQxDKrinxRZjLpKvdR8bB48w2Py8 JFZ6OBcMLUnE2//Xs/i2buG8z6cwopzMFT05KTeiTrEQ0Q5HU+x0DjFYlCCy7xx5c3In gQeMSkXCnqoWsnmuR8WJYcdTCbEXdImLkvmfcUAb18JdEY1HbW0Bi4JtHA0tJqNO3kKG c25cDw/vbwSZwadSUrUeo7mSERjJk4TB0qqFJz/YCWH84PCpt4/fNeF9em6ANvev+ftW bNog== X-Gm-Message-State: AOJu0Yy2tYWVRHYJnR4cqqLboeE6MtdDODIjmAGE+M+eJevJuEBl0hQc wsFPLiG5H+E2m2MJnMFF0JUZwQ== 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: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 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); } =20 static void mptcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_m= sg *r, --=20 2.40.1 From nobody Mon Oct 14 08:20:38 2024 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35F3EA939 for ; Wed, 23 Aug 2023 07:24:30 +0000 (UTC) Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-4ff8cf11b90so8288499e87.1 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=gQM2iSwZZnph3XA4uuIVm5YSZuBBWF6K60H2bwaggPUWRH72HrjynU9hKo/IixbBYS fuv2FJYM/1QFCQMfc3EESasGpcrlFy2Lz6C4Ut6KMWEXjEMJqVN7kXGDiRP1I2Mg3aeS 527DveAjJWBV7HFIGnFeU8tNqc1TYilnkxFh3dxq2Tu4V7E+LZF641m01Qjd7H/W13V3 QKBgoMGTvqBhbfaRIrWo35jubo+Id6K3Uc8vVLeoRRNm6WkcmZt7bbd/DMajKJgxjZfs FojvoEUWlbjacSFY4UmgaNcHZfhLG/e1l2h3njvqOahfMwD2xmSSxHm9n5p8aUxYv8fv E16A== X-Gm-Message-State: AOJu0YznVXBKvJJ64PI8xmDBwopN+BtwRkK1TKkRhg1gSSItMtVP8cub D0wMmjRj9NBU1/VZ4Fyh/D6X+7MH4zib37uYvG3Axw== 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: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 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); } =20 static void mptcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_m= sg *r, --=20 2.40.1