[PATCH net-next 0/9] mptcp: expose more info and small improvements

Matthieu Baerts posted 9 patches 10 months, 2 weeks ago
Failed in applying to current master (apply log)
include/uapi/linux/mptcp.h                        |  29 +++++
net/mptcp/options.c                               |  14 +-
net/mptcp/pm_netlink.c                            |   8 +-
net/mptcp/pm_userspace.c                          |   2 +-
net/mptcp/protocol.c                              |  31 +++--
net/mptcp/protocol.h                              |  11 +-
net/mptcp/sockopt.c                               | 152 +++++++++++++++++++++-
net/mptcp/subflow.c                               |   2 +
tools/testing/selftests/net/mptcp/mptcp_join.sh   |  33 ++---
tools/testing/selftests/net/mptcp/mptcp_sockopt.c | 120 ++++++++++++++++-
10 files changed, 356 insertions(+), 46 deletions(-)
[PATCH net-next 0/9] mptcp: expose more info and small improvements
Posted by Matthieu Baerts 10 months, 2 weeks ago
Patch 1-3/9 track and expose some aggregated data counters at the MPTCP
level: the number of retransmissions and the bytes that have been
transferred. The first patch prepares the work by moving where snd_una
is updated for fallback sockets while the last patch adds some tests to
cover the new code.

Patch 4-6/9 introduce a new getsockopt for SOL_MPTCP: MPTCP_FULL_INFO.
This new socket option allows to combine info from MPTCP_INFO,
MPTCP_TCPINFO and MPTCP_SUBFLOW_ADDRS socket options into one. It can be
needed to have all info in one because the path-manager can close and
re-create subflows between getsockopt() and fooling the accounting. The
first patch introduces a unique subflow ID to easily detect when
subflows are being re-created with the same 5-tuple while the last patch
adds some tests to cover the new code.

Please note that patch 5/9 ("mptcp: introduce MPTCP_FULL_INFO getsockopt")
can reveal a bug that were there for a bit of time, see [1]. A fix has
recently been fixed to netdev for the -net tree: "mptcp: ensure listener
is unhashed before updating the sk status", see [2]. There is no
conflicts between the two patches but it might be better to apply this
series after the one for -net and after having merged "net" into
"net-next".

Patch 7/9 is similar to commit 47867f0a7e83 ("selftests: mptcp: join:
skip check if MIB counter not supported") recently applied in the -net
tree but here it adapts the new code that is only in net-next (and it
fixes a merge conflict resolution which didn't have any impact).

Patch 8 and 9/9 are two simple refactoring. One to consolidate the
transition to TCP_CLOSE in mptcp_do_fastclose() and avoid duplicated
code. The other one reduces the scope of an argument passed to
mptcp_pm_alloc_anno_list() function.

Link: https://github.com/multipath-tcp/mptcp_net-next/issues/407 [1]
Link: https://lore.kernel.org/netdev/20230620-upstream-net-20230620-misc-fixes-for-v6-4-v1-0-f36aa5eae8b9@tessares.net/ [2]
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
Geliang Tang (1):
      mptcp: pass addr to mptcp_pm_alloc_anno_list

Matthieu Baerts (1):
      selftests: mptcp: join: skip check if MIB counter not supported (part 2)

Paolo Abeni (7):
      mptcp: move snd_una update earlier for fallback socket
      mptcp: track some aggregate data counters
      selftests: mptcp: explicitly tests aggregate counters
      mptcp: add subflow unique id
      mptcp: introduce MPTCP_FULL_INFO getsockopt
      selftests: mptcp: add MPTCP_FULL_INFO testcase
      mptcp: consolidate transition to TCP_CLOSE in mptcp_do_fastclose()

 include/uapi/linux/mptcp.h                        |  29 +++++
 net/mptcp/options.c                               |  14 +-
 net/mptcp/pm_netlink.c                            |   8 +-
 net/mptcp/pm_userspace.c                          |   2 +-
 net/mptcp/protocol.c                              |  31 +++--
 net/mptcp/protocol.h                              |  11 +-
 net/mptcp/sockopt.c                               | 152 +++++++++++++++++++++-
 net/mptcp/subflow.c                               |   2 +
 tools/testing/selftests/net/mptcp/mptcp_join.sh   |  33 ++---
 tools/testing/selftests/net/mptcp/mptcp_sockopt.c | 120 ++++++++++++++++-
 10 files changed, 356 insertions(+), 46 deletions(-)
---
base-commit: 712557f210723101717570844c95ac0913af74d7
change-id: 20230620-upstream-net-next-20230620-mptcp-expose-more-info-and-misc-6b4a3a415ec5

Best regards,
-- 
Matthieu Baerts <matthieu.baerts@tessares.net>
Re: [PATCH net-next 0/9] mptcp: expose more info and small improvements
Posted by patchwork-bot+netdevbpf@kernel.org 10 months, 1 week ago
Hello:

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

On Tue, 20 Jun 2023 18:30:13 +0200 you wrote:
> Patch 1-3/9 track and expose some aggregated data counters at the MPTCP
> level: the number of retransmissions and the bytes that have been
> transferred. The first patch prepares the work by moving where snd_una
> is updated for fallback sockets while the last patch adds some tests to
> cover the new code.
> 
> Patch 4-6/9 introduce a new getsockopt for SOL_MPTCP: MPTCP_FULL_INFO.
> This new socket option allows to combine info from MPTCP_INFO,
> MPTCP_TCPINFO and MPTCP_SUBFLOW_ADDRS socket options into one. It can be
> needed to have all info in one because the path-manager can close and
> re-create subflows between getsockopt() and fooling the accounting. The
> first patch introduces a unique subflow ID to easily detect when
> subflows are being re-created with the same 5-tuple while the last patch
> adds some tests to cover the new code.
> 
> [...]

Here is the summary with links:
  - [net-next,1/9] mptcp: move snd_una update earlier for fallback socket
    https://git.kernel.org/netdev/net-next/c/c026d33b8f50
  - [net-next,2/9] mptcp: track some aggregate data counters
    https://git.kernel.org/netdev/net-next/c/38967f424b5b
  - [net-next,3/9] selftests: mptcp: explicitly tests aggregate counters
    https://git.kernel.org/netdev/net-next/c/5dcff89e1455
  - [net-next,4/9] mptcp: add subflow unique id
    https://git.kernel.org/netdev/net-next/c/6f06b4d4d1cc
  - [net-next,5/9] mptcp: introduce MPTCP_FULL_INFO getsockopt
    https://git.kernel.org/netdev/net-next/c/492432074e4f
  - [net-next,6/9] selftests: mptcp: add MPTCP_FULL_INFO testcase
    https://git.kernel.org/netdev/net-next/c/aa723d5b3541
  - [net-next,7/9] selftests: mptcp: join: skip check if MIB counter not supported (part 2)
    https://git.kernel.org/netdev/net-next/c/00079f18c24f
  - [net-next,8/9] mptcp: consolidate transition to TCP_CLOSE in mptcp_do_fastclose()
    https://git.kernel.org/netdev/net-next/c/bbd49d114d57
  - [net-next,9/9] mptcp: pass addr to mptcp_pm_alloc_anno_list
    https://git.kernel.org/netdev/net-next/c/528cb5f2a1e8

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html