OSDN Git Service

mptcp: listen diag dump support
authorFlorian Westphal <fw@strlen.de>
Fri, 8 Apr 2022 19:46:00 +0000 (12:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Apr 2022 10:55:53 +0000 (11:55 +0100)
commit4fa39b701ce9be7ec2169f7fba4f8dc1a3b92aac
tree59915df358ffa19fd23115538a32f2c624572ffa
parente8887b716142e41d5b975309a96fdcbe8e5bd698
mptcp: listen diag dump support

makes 'ss -Ml' show mptcp listen sockets.

Iterate over the tcp listen sockets and pick those that have mptcp ulp
info attached.

mptcp_diag_get_info() is modified to prefer msk->first for mptcp sockets
in listen state.  This reports accurate number for recv and send queue
(pending / max connection backlog counters).

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

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/mptcp_diag.c