Message ID | 20231222-upstream-net-next-20231221-mptcp-currestab-v1-0-c1eb73d6b2b2@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-9721-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1035010dyi; Fri, 22 Dec 2023 04:48:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IH0OadaEk6gChwpbw5BATRuplRX7BcxhuhSdyH4uQ93N96x3gOsynAIH/eYT2HsB9/K+CTe X-Received: by 2002:a05:6214:48e:b0:67e:e8c5:6eda with SMTP id pt14-20020a056214048e00b0067ee8c56edamr1688547qvb.33.1703249294241; Fri, 22 Dec 2023 04:48:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703249294; cv=none; d=google.com; s=arc-20160816; b=RtIuMb6lapZeVKVtTLHbghX05xU2iul/tjU9vW7BvnxbK0maVswS6PbdJpNXjJh/u6 d5UJZmImd+/zt2EKCp4HSXCjgwnd8y7L5gTopDh5Cnme0VC9wn5Ehu06G+N1BJKtKWGY p7i57P+6rTLKoEkRgbHH28X0jfCwmXqBAadIArgEVGQe5hDB9VZH+wQ0VgeV+C4pbyRf qYuTj8zmm2/QU/D4kJx6XLy9tOuRhpHkhMBb+Q2lccT0Z2jHEXDOI0PLiu0LqAM+T+mo MtBLqXzzllaMXayc+JEY6cyY7cFnHVh9Rp2xo/JoeK0Zl+1Y1YXnjzM/WAUfWJqdMEiR 0YHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=O+EuhRLKXrNx0H2RWKaQVe/4sDH1ZuTfvghCd6aDYTU=; fh=KNmpzBULWDx6/dx+97L89icAJeAGaH3v4uWu8z4j10o=; b=Klobg3ry7CyAZgrzEQJzQ1q5GZNXq6yJjx111UlnrKxxdm/pVriTtFfQqCeEn94rMi smJiThFCcPbF/q1TTv9s+8mWdr8C13wtIuCFsG8qvueEmdXEuWXrkNAxcMyR1p4YPfep O8fLKBhgHBMpWO2Llm+1uo5Ix6Xslxbh2qQ7Oc9JORhb1dvvVLq1pAmaf+PbLZuNtf/C QIys6aroArAGr4yS4XMx9RomyX2PlT8lVIEPGAriSa1BgJbm4VgVWEOuTTf5eSkJS3cd 8lPo+AQrPya6dHIiyEzmuqIjjut7ZlcNDkl+UWjuLMMgKQBHulv2ssjgQeUVLIwtVE73 1+JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a5qhg8Hw; spf=pass (google.com: domain of linux-kernel+bounces-9721-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9721-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e19-20020a0ce3d3000000b0067f69b6e7a3si4394088qvl.75.2023.12.22.04.48.14 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 04:48:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9721-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a5qhg8Hw; spf=pass (google.com: domain of linux-kernel+bounces-9721-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9721-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0B7C41C22092 for <ouuuleilei@gmail.com>; Fri, 22 Dec 2023 12:48:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 669BA19465; Fri, 22 Dec 2023 12:47:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="a5qhg8Hw" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C0C461CA86; Fri, 22 Dec 2023 12:47:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D42E9C433C8; Fri, 22 Dec 2023 12:47:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703249273; bh=EyUZ3UqCZNaIyeU3Sh7ZrYlDoc8LVGqooafyQoOjCQw=; h=From:Subject:Date:To:Cc:From; b=a5qhg8HwFPkcGt7w+G8SxbajrkpwZ6XOdJpbBztoo6ciI3seNd9YFo/6D6Vy7xJI3 QP668vwTI3PXqd29lQ1HK3cBpvwSjtri6ZYYdkzbV560JcqkGmu0HPvz0wuQ6+QwXo WzaHN5QEPAtkOKGXoeUijhiNdJy+h4t8j/JHvO7+CdtcAAJPwBKX5FT5Hj0Qtbpr49 f54QDCc1ESs33VswrnCLSXrRzLgkHK2ELn5ndGQNG7ssRTYzKn49WGdVNCHefpDZJ4 GIbSTzK25pkJGJpHP+dNLUPNkIQia7+SJO+2kd7puLkJ7UfhXCv6rFJVmsCYv4VjzV h/AWcTjqnHj5g== From: Matthieu Baerts <matttbe@kernel.org> Subject: [PATCH net-next 0/4] mptcp: add CurrEstab MIB counter Date: Fri, 22 Dec 2023 13:47:21 +0100 Message-Id: <20231222-upstream-net-next-20231221-mptcp-currestab-v1-0-c1eb73d6b2b2@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAFmFhWUC/z2NzQoCMQyEX2XJ2UAbf/FVxENbo+awtSRZWVj23 S2CHubwMXwzCxirsMF5WED5LSav2iFuBijPVB+McusMFGgbiSJOzVw5jVjZe2bHfzU2Lw3LpMr mKeM+0elwzLtAIUMfbMp3mb9nF/jpcF3XDyQ12fiGAAAA To: mptcp@lists.linux.dev, Mat Martineau <martineau@kernel.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>, Geliang Tang <geliang.tang@linux.dev> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Matthieu Baerts <matttbe@kernel.org> X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1751; i=matttbe@kernel.org; h=from:subject:message-id; bh=EyUZ3UqCZNaIyeU3Sh7ZrYlDoc8LVGqooafyQoOjCQw=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBlhYV2BBEZq0s8r6/TZBHt3VwVxg7bAGwGbzGfC OE/4AbXeIiJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZYWFdgAKCRD2t4JPQmmg c5OWD/9/9eZaNEWZPQSoCfNq94+iDaSw8LXYh7jksCmsz/JUHWycua3FlxS02MjsjMjMIeb0C1A i4ugFR/71nufXjCafRzHzfiJKmmfYs2GGhVc1VXfA34o0ZyeJ+t9VXY5ggbAOCdw47zdOrLF7gv WiFP1+g5EmKNEiroZY6sTNa5D/Jd8hy0XHlsMOVG2sXPSgRKzr+wNjdo9PUe1TbSIKpIE/dimlE vgeYu87EN53X7Gl93ukQMaOvD5HcYAPgaZRBrwfyp9oo0JaxkuvSxYxEjpdxwOGZ5oKA4s5VI1Z ypQ1C3bKbhzx2WQNvaH/QFqm1QPnsGHfQFWTt96wZeMsZwxSNYckNvjZRsCy5cOsAI1ayV7dj/t Q00hN0o3PaIW3G8n/H6X0XZjVIH8geQyIM+UeK1XwxXgtPIhWSz5KYAy6xO/U4BdcHUqLDkwyh9 NT0m4cQCLi+kMGQKhrkfALf+sIopWcIqGb9erKFAV9OJZjgJS0P2xNSnt6JfD94RZgiGLU93umK aTkf8ldywm3YH/Dknoc+RSfVwaHivHEFbONbyGqPaQsdT22eX3TxD35GxjmX9KIftTcOykeadu7 x+mnzOzIAH8XJMQjxKtemC1CEER1mQXe+qHgXGkXWaVWKobC9vkLwOjEDvQayu9io5rkG/p3XMu bFsN0RajN035enQ== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785986332006362867 X-GMAIL-MSGID: 1785986332006362867 |
Series | mptcp: add CurrEstab MIB counter | |
Message
Matthieu Baerts (NGI0)
Dec. 22, 2023, 12:47 p.m. UTC
This MIB counter is similar to the one of TCP -- CurrEstab -- available
in /proc/net/snmp. This is useful to quickly list the number of MPTCP
connections without having to iterate over all of them.
Patch 1 prepares its support by adding new helper functions:
- MPTCP_DEC_STATS(): similar to MPTCP_INC_STATS(), but this time to
decrement a counter.
- mptcp_set_state(): similar to tcp_set_state(), to change the state of
an MPTCP socket, and to inc/decrement the new counter when needed.
Patch 2 uses mptcp_set_state() instead of directly calling
inet_sk_state_store() to change the state of MPTCP sockets.
Patch 3 and 4 validate the new feature in MPTCP "join" and "diag"
selftests.
Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
---
Geliang Tang (4):
mptcp: add CurrEstab MIB counter support
mptcp: use mptcp_set_state
selftests: mptcp: join: check CURRESTAB counters
selftests: mptcp: diag: check CURRESTAB counters
net/mptcp/mib.c | 1 +
net/mptcp/mib.h | 8 ++++
net/mptcp/pm_netlink.c | 5 +++
net/mptcp/protocol.c | 56 ++++++++++++++++---------
net/mptcp/protocol.h | 1 +
net/mptcp/subflow.c | 2 +-
tools/testing/selftests/net/mptcp/diag.sh | 17 +++++++-
tools/testing/selftests/net/mptcp/mptcp_join.sh | 46 +++++++++++++++++---
8 files changed, 110 insertions(+), 26 deletions(-)
---
base-commit: 56794e5358542b7c652f202946e53bfd2373b5e0
change-id: 20231221-upstream-net-next-20231221-mptcp-currestab-5a2867b4020b
Best regards,
Comments
Hello: This series was applied to netdev/net-next.git (main) by David S. Miller <davem@davemloft.net>: On Fri, 22 Dec 2023 13:47:21 +0100 you wrote: > This MIB counter is similar to the one of TCP -- CurrEstab -- available > in /proc/net/snmp. This is useful to quickly list the number of MPTCP > connections without having to iterate over all of them. > > Patch 1 prepares its support by adding new helper functions: > > - MPTCP_DEC_STATS(): similar to MPTCP_INC_STATS(), but this time to > decrement a counter. > > [...] Here is the summary with links: - [net-next,1/4] mptcp: add CurrEstab MIB counter support https://git.kernel.org/netdev/net-next/c/d9cd27b8cd19 - [net-next,2/4] mptcp: use mptcp_set_state (no matching commit) - [net-next,3/4] selftests: mptcp: join: check CURRESTAB counters https://git.kernel.org/netdev/net-next/c/0bd962dd86b2 - [net-next,4/4] selftests: mptcp: diag: check CURRESTAB counters https://git.kernel.org/netdev/net-next/c/81ab772819da You are awesome, thank you!