[PATCH mptcp-next v3 0/4] mptcp: inet diag listen dump support

Florian Westphal posted 4 patches 2 years ago
Failed in applying to current master (apply log)
net/mptcp/mptcp_diag.c                    | 105 +++++++++++++++++++++-
net/mptcp/sockopt.c                       |   6 --
tools/testing/selftests/net/mptcp/diag.sh |  38 ++++++++
3 files changed, 140 insertions(+), 9 deletions(-)
[PATCH mptcp-next v3 0/4] mptcp: inet diag listen dump support
Posted by Florian Westphal 2 years ago
Changes in v3: fix intendation, fix uninitialised var (Mat)
	       extend mptcp diag tests

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

 net/mptcp/mptcp_diag.c                    | 105 +++++++++++++++++++++-
 net/mptcp/sockopt.c                       |   6 --
 tools/testing/selftests/net/mptcp/diag.sh |  38 ++++++++
 3 files changed, 140 insertions(+), 9 deletions(-)

-- 
2.35.1


Re: [PATCH mptcp-next v3 0/4] mptcp: inet diag listen dump support
Posted by Matthieu Baerts 2 years ago
Hi Florian, Mat,

On 29/03/2022 13:35, Florian Westphal wrote:
> Changes in v3: fix intendation, fix uninitialised var (Mat)
> 	       extend mptcp diag tests
> 
> 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

Thank you for these patches and reviews!

Now in our tree (feat. for net-next) with Mat's RvB tag:

New patches for t/upstream:
- 0432b1c61654: mptcp: diag: switch to context structure
- ba9e26b62530: mptcp: remove locking in mptcp_diag_fill_info
- b433728093dd: mptcp: listen diag dump support
- a9cc2c58bf79: selftests/mptcp: add diag listen tests
- Results: ccc95f7c14d9..3b82e3d7eed2 (export)

Builds and tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20220330T150002
https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

Re: [PATCH mptcp-next v3 0/4] mptcp: inet diag listen dump support
Posted by Mat Martineau 2 years ago
On Tue, 29 Mar 2022, Florian Westphal wrote:

> Changes in v3: fix intendation, fix uninitialised var (Mat)
> 	       extend mptcp diag tests

Thanks for adding the tests. Series looks good to me:

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>

>
> 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 (4):
>  mptcp: diag: switch to context structure
>  mptcp: remove locking in mptcp_diag_fill_info
>  mptcp: listen diag dump support
>  selftests/mptcp: add diag listen tests
>
> net/mptcp/mptcp_diag.c                    | 105 +++++++++++++++++++++-
> net/mptcp/sockopt.c                       |   6 --
> tools/testing/selftests/net/mptcp/diag.sh |  38 ++++++++
> 3 files changed, 140 insertions(+), 9 deletions(-)
>
> -- 
> 2.35.1
>
>
>

--
Mat Martineau
Intel