[net-next,00/11] mptcp: PM listener events + selftests cleanup

Message ID 20221130140637.409926-1-matthieu.baerts@tessares.net
Headers
Series mptcp: PM listener events + selftests cleanup |

Message

Matthieu Baerts Nov. 30, 2022, 2:06 p.m. UTC
  Thanks to the patch 6/11, the MPTCP path manager now sends Netlink events when
MPTCP listening sockets are created and closed. The reason why it is needed is
explained in the linked ticket [1]:

  MPTCP for Linux, when not using the in-kernel PM, depends on the userspace PM
  to create extra listening sockets before announcing addresses and ports. Let's
  call these "PM listeners".

  With the existing MPTCP netlink events, a userspace PM can create PM listeners
  at startup time, or in response to an incoming connection. Creating sockets in
  response to connections is not optimal: ADD_ADDRs can't be sent until the
  sockets are created and listen()ed, and if all connections are closed then it
  may not be clear to the userspace PM daemon that PM listener sockets should be
  cleaned up.

  Hence this feature request: to add MPTCP netlink events for listening socket
  close & create, so PM listening sockets can be managed based on application
  activity.

  [1] https://github.com/multipath-tcp/mptcp_net-next/issues/313

Selftests for these new Netlink events have been added in patches 9,11/11.

The remaining patches introduce different cleanups and small improvements in
MPTCP selftests to ease the maintenance and the addition of new tests.


Geliang Tang (6):
  mptcp: add pm listener events
  selftests: mptcp: enhance userspace pm tests
  selftests: mptcp: make evts global in userspace_pm
  selftests: mptcp: listener test for userspace PM
  selftests: mptcp: make evts global in mptcp_join
  selftests: mptcp: listener test for in-kernel PM

Matthieu Baerts (5):
  selftests: mptcp: run mptcp_inq from a clean netns
  selftests: mptcp: removed defined but unused vars
  selftests: mptcp: uniform 'rndh' variable
  selftests: mptcp: clearly declare global ns vars
  selftests: mptcp: declare var as local

 include/uapi/linux/mptcp.h                    |   9 +
 net/mptcp/pm_netlink.c                        |  57 ++++
 net/mptcp/protocol.c                          |   3 +
 net/mptcp/protocol.h                          |   2 +
 tools/testing/selftests/net/mptcp/diag.sh     |   1 +
 .../selftests/net/mptcp/mptcp_connect.sh      |   6 +-
 .../testing/selftests/net/mptcp/mptcp_join.sh | 118 +++++--
 .../selftests/net/mptcp/mptcp_sockopt.sh      |  69 ++--
 .../selftests/net/mptcp/simult_flows.sh       |   4 +-
 .../selftests/net/mptcp/userspace_pm.sh       | 298 ++++++++++--------
 10 files changed, 375 insertions(+), 192 deletions(-)


base-commit: 91a7de85600d5dfa272cea3cef83052e067dc0ab
  

Comments

Jakub Kicinski Dec. 2, 2022, 4:09 a.m. UTC | #1
On Wed, 30 Nov 2022 15:06:22 +0100 Matthieu Baerts wrote:
> Thanks to the patch 6/11, the MPTCP path manager now sends Netlink events when
> MPTCP listening sockets are created and closed. The reason why it is needed is
> explained in the linked ticket [1]:
> 
>   MPTCP for Linux, when not using the in-kernel PM, depends on the userspace PM
>   to create extra listening sockets before announcing addresses and ports. Let's
>   call these "PM listeners".
> 
>   With the existing MPTCP netlink events, a userspace PM can create PM listeners
>   at startup time, or in response to an incoming connection. Creating sockets in
>   response to connections is not optimal: ADD_ADDRs can't be sent until the
>   sockets are created and listen()ed, and if all connections are closed then it
>   may not be clear to the userspace PM daemon that PM listener sockets should be
>   cleaned up.
> 
>   Hence this feature request: to add MPTCP netlink events for listening socket
>   close & create, so PM listening sockets can be managed based on application
>   activity.
> 
>   [1] https://github.com/multipath-tcp/mptcp_net-next/issues/313
> 
> Selftests for these new Netlink events have been added in patches 9,11/11.
> 
> The remaining patches introduce different cleanups and small improvements in
> MPTCP selftests to ease the maintenance and the addition of new tests.

Also could you warp you cover letters at 72 characters?
I need to reflow them before I can read them :(
  
patchwork-bot+netdevbpf@kernel.org Dec. 2, 2022, 4:20 a.m. UTC | #2
Hello:

This series was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 30 Nov 2022 15:06:22 +0100 you wrote:
> Thanks to the patch 6/11, the MPTCP path manager now sends Netlink events when
> MPTCP listening sockets are created and closed. The reason why it is needed is
> explained in the linked ticket [1]:
> 
>   MPTCP for Linux, when not using the in-kernel PM, depends on the userspace PM
>   to create extra listening sockets before announcing addresses and ports. Let's
>   call these "PM listeners".
> 
> [...]

Here is the summary with links:
  - [net-next,01/11] selftests: mptcp: run mptcp_inq from a clean netns
    https://git.kernel.org/netdev/net-next/c/b4e0df4cafe1
  - [net-next,02/11] selftests: mptcp: removed defined but unused vars
    https://git.kernel.org/netdev/net-next/c/b71dd705179c
  - [net-next,03/11] selftests: mptcp: uniform 'rndh' variable
    https://git.kernel.org/netdev/net-next/c/787eb1e4df93
  - [net-next,04/11] selftests: mptcp: clearly declare global ns vars
    https://git.kernel.org/netdev/net-next/c/de2392028a19
  - [net-next,05/11] selftests: mptcp: declare var as local
    https://git.kernel.org/netdev/net-next/c/5f17f8e315ad
  - [net-next,06/11] mptcp: add pm listener events
    https://git.kernel.org/netdev/net-next/c/f8c9dfbd875b
  - [net-next,07/11] selftests: mptcp: enhance userspace pm tests
    https://git.kernel.org/netdev/net-next/c/7dff74f5716e
  - [net-next,08/11] selftests: mptcp: make evts global in userspace_pm
    https://git.kernel.org/netdev/net-next/c/1cc94ac1af4b
  - [net-next,09/11] selftests: mptcp: listener test for userspace PM
    https://git.kernel.org/netdev/net-next/c/6c73008aa301
  - [net-next,10/11] selftests: mptcp: make evts global in mptcp_join
    https://git.kernel.org/netdev/net-next/c/a3735625572d
  - [net-next,11/11] selftests: mptcp: listener test for in-kernel PM
    https://git.kernel.org/netdev/net-next/c/178d023208eb

You are awesome, thank you!
  
Matthieu Baerts Dec. 2, 2022, 10:33 a.m. UTC | #3
Hi Jakub,

On 02/12/2022 05:09, Jakub Kicinski wrote:
> On Wed, 30 Nov 2022 15:06:22 +0100 Matthieu Baerts wrote:
>> Thanks to the patch 6/11, the MPTCP path manager now sends Netlink events when
>> MPTCP listening sockets are created and closed. The reason why it is needed is
>> explained in the linked ticket [1]:
>>
>>   MPTCP for Linux, when not using the in-kernel PM, depends on the userspace PM
>>   to create extra listening sockets before announcing addresses and ports. Let's
>>   call these "PM listeners".
>>
>>   With the existing MPTCP netlink events, a userspace PM can create PM listeners
>>   at startup time, or in response to an incoming connection. Creating sockets in
>>   response to connections is not optimal: ADD_ADDRs can't be sent until the
>>   sockets are created and listen()ed, and if all connections are closed then it
>>   may not be clear to the userspace PM daemon that PM listener sockets should be
>>   cleaned up.
>>
>>   Hence this feature request: to add MPTCP netlink events for listening socket
>>   close & create, so PM listening sockets can be managed based on application
>>   activity.
>>
>>   [1] https://github.com/multipath-tcp/mptcp_net-next/issues/313
>>
>> Selftests for these new Netlink events have been added in patches 9,11/11.
>>
>> The remaining patches introduce different cleanups and small improvements in
>> MPTCP selftests to ease the maintenance and the addition of new tests.
> 
> Also could you warp you cover letters at 72 characters?
> I need to reflow them before I can read them :(

Oops, my bad, I'm sorry for that! Thank you for having reported the issue!

I didn't notice I didn't set the limit to 72 chars for the
"gitsendemail" file type like I did for "gitcommit" in my current vim
config. Done now, next cover-letter should be properly formatted! :)

Cheers,
Matt