[PATCH mptcp-next v2 0/3] mptcp: inet diag listen dump support

Florian Westphal posted 3 patches 2 years ago
Failed in applying to current master (apply log)
There is a newer version of this series
net/mptcp/mptcp_diag.c | 102 +++++++++++++++++++++++++++++++++++++++--
net/mptcp/sockopt.c    |   6 ---
2 files changed, 99 insertions(+), 9 deletions(-)
[PATCH mptcp-next v2 0/3] mptcp: inet diag listen dump support
Posted by Florian Westphal 2 years ago
Changes in v2: drop patch 4 and prefer msk->first (Paolo Abeni)

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.

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 (3):
  mptcp: diag: switch to context structure
  mptcp: remove locking in mptcp_diag_fill_info
  mptcp: listen diag dump support

 net/mptcp/mptcp_diag.c | 102 +++++++++++++++++++++++++++++++++++++++--
 net/mptcp/sockopt.c    |   6 ---
 2 files changed, 99 insertions(+), 9 deletions(-)

-- 
2.35.1