mbox series

[mptcp-next,v7,00/11] BPF path manager, part 5

Message ID cover.1740975633.git.tanggeliang@kylinos.cn (mailing list archive)
Headers show
Series BPF path manager, part 5 | expand

Message

Geliang Tang March 3, 2025, 4:22 a.m. UTC
From: Geliang Tang <tanggeliang@kylinos.cn>

v7:
 - addresss Matt's comments in v6 [1].
 - drop "type" from struct mptcp_pm_ops as Matt suggested.
 - map "pm_type" to new sysctl as Matt suggested.

Depends on:
 - mptcp: pm: code reorganisation, v2

Based-on: <20250228-mptcp-pm-reorg-code-v2-0-fa8b2542b7a5@kernel.org>

[1]
https://patchwork.kernel.org/project/mptcp/cover/cover.1740320007.git.tanggeliang@kylinos.cn/

v6:
 - add "name" in struct mptcp_pm_ops.
 - add some "sysctl" patches.
 - drop "struct mptcp_pm_param".
 - drop "pm_type" in mptcp_pm_data.

v5:
 - use "struct mptcp_pm_param *param" as unified parameters for all
   interfaces.
 - register in-kernel mptcp_pm_ops too.
 - only implement two interfaces "get_local_id" and "get_priority" in
   this set.

v4:
 - include a new patch "define BPF path manager type".

 - add new interfaces:
	created established closed
	listerner_created listener_closed

 - rename interfaces as:
	address_announced address_removed
	subflow_established subflow_closed
	get_priority set_priority

 - rename functions as:
	mptcp_pm_validate
	mptcp_pm_register
	mptcp_pm_unregister
	mptcp_pm_initialize
	mptcp_pm_release

v3:
 - rename the 2nd parameter of get_local_id() from 'local' to 'skc'.
 - keep the 'msk_sport' check in mptcp_userspace_pm_get_local_id().
 - return 'err' instead of '0' in userspace_pm_subflow_create().
 - drop 'ret' variable inmptcp_pm_data_reset().
 - fix typos in commit log.

v2:
 - update get_local_id interface in patch 2.

get_addr() and dump_addr() interfaces of BPF userspace pm are dropped
as Matt suggested.

In order to implement BPF path manager, it's necessary to unify the
interfaces of the path manager. This set contains some cleanups and
refactoring to unify the interfaces in kernel space. Finally, define
a struct mptcp_pm_ops for a path manager.

Geliang Tang (11):
  mptcp: pm: define struct mptcp_pm_ops
  mptcp: sysctl: new sysctl to set path manager by name
  mptcp: sysctl: map pm_type to path_manager
  mptcp: sysctl: add available_path_managers
  mptcp: pm: in-kernel: register mptcp_kernel_pm
  mptcp: pm: userspace: register mptcp_userspace_pm
  mptcp: pm: initialize and release mptcp_pm_ops
  mptcp: pm: drop pm_type in mptcp_pm_data
  mptcp: sysctl: drop get_pm_type helper
  mptcp: pm: make get_local_id helpers static
  mptcp: pm: make is_backup helpers static

 Documentation/networking/mptcp-sysctl.rst |  26 +++++
 include/net/mptcp.h                       |  19 ++++
 net/mptcp/ctrl.c                          | 107 ++++++++++++++++-
 net/mptcp/pm.c                            | 133 +++++++++++++++++++---
 net/mptcp/pm_kernel.c                     |  16 ++-
 net/mptcp/pm_userspace.c                  |  26 ++++-
 net/mptcp/protocol.h                      |  25 ++--
 7 files changed, 317 insertions(+), 35 deletions(-)

Comments

MPTCP CI March 3, 2025, 5:32 a.m. UTC | #1
Hi Geliang,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal: Unstable: 1 failed test(s): selftest_mptcp_connect 
Matthieu Baerts (NGI0) March 3, 2025, 10:38 a.m. UTC | #2
Hi Geliang,

On 03/03/2025 05:22, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> v7:
>  - addresss Matt's comments in v6 [1].
>  - drop "type" from struct mptcp_pm_ops as Matt suggested.
>  - map "pm_type" to new sysctl as Matt suggested.
> 
> Depends on:
>  - mptcp: pm: code reorganisation, v2

Is it OK for you if I apply this "code reorganisation" series as it is?
If there are no major changes needed, it will be easier to apply it now,
and send it upstream "soon".

Thank you for the v7. I have some comments, no big changes, I think we
are heading in the right direction.

Cheers,
Matt