From patchwork Thu Mar 24 13:57:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Westphal X-Patchwork-Id: 12790707 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [193.142.43.52]) (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 95CF91FC0 for ; Thu, 24 Mar 2022 13:58:13 +0000 (UTC) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1nXNyX-0006za-Jc; Thu, 24 Mar 2022 14:58:05 +0100 From: Florian Westphal To: Cc: Florian Westphal Subject: [PATCH mptcp-next 0/4] mptcp: listen dump support Date: Thu, 24 Mar 2022 14:57:49 +0100 Message-Id: <20220324135753.25182-1-fw@strlen.de> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Done in a not-very-elegant way: Iterate over tcp listen hash, then pick out the tcp sockets with mptcp-ctx structure attached, then take the conn->sk for dumping. First patch is preparation/cleanup. Second patch gets rid of locking to avoid a lockdep splat. If the socket lock is really needed (I don't see where) I can workaround this by dropping locks temporarily when iterating the listen hash table, but its a bit more awkward. Last patch is needed so that 'Send-Q' has expected content instead of 0. Sample output: ss -Mil State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 20 127.0.0.1:12000 0.0.0.0:* subflows_max:2 Florian Westphal (4): mptcp: diag: switch to context structure mptcp: remove locking in mptcp_diag_fill_info mptcp: listen diag dump support mptcp: let mptcp listen dump show listen backlog size net/mptcp/mptcp_diag.c | 91 +++++++++++++++++++++++++++++++++++++++--- net/mptcp/protocol.c | 5 ++- net/mptcp/sockopt.c | 6 --- 3 files changed, 90 insertions(+), 12 deletions(-)