Series |
BPF path manager
|
expand
-
[mptcp-next,v2,00/36] BPF path manager
-
[mptcp-next,v2,01/36] mptcp: drop else in mptcp_pm_addr_families_match
-
[mptcp-next,v2,02/36] mptcp: use __lookup_addr in pm_netlink
-
[mptcp-next,v2,03/36] mptcp: add mptcp_for_each_address macros
-
[mptcp-next,v2,04/36] mptcp: use sock_kfree_s instead of kfree
-
[mptcp-next,v2,05/36] mptcp: add lookup_addr for userspace pm
-
[mptcp-next,v2,06/36] mptcp: add mptcp_userspace_pm_get_sock helper
-
[mptcp-next,v2,07/36] mptcp: make three pm wrappers static
-
[mptcp-next,v2,08/36] mptcp: drop skb parameter of get_addr
-
[mptcp-next,v2,09/36] mptcp: add id parameter for get_addr
-
[mptcp-next,v2,10/36] mptcp: add addr parameter for get_addr
-
[mptcp-next,v2,11/36] mptcp: reuse sending nlmsg code in get_addr
-
[mptcp-next,v2,12/36] mptcp: change info of get_addr as const
-
[mptcp-next,v2,13/36] mptcp: add struct mptcp_id_bitmap
-
[mptcp-next,v2,14/36] mptcp: refactor dump_addr with id bitmap
-
[mptcp-next,v2,15/36] mptcp: refactor dump_addr with get_addr
-
[mptcp-next,v2,16/36] mptcp: reuse sending nlmsg code in dump_addr
-
[mptcp-next,v2,17/36] mptcp: update local address flags when setting it
-
[mptcp-next,v2,18/36] mptcp: change rem type of set_flags
-
[mptcp-next,v2,19/36] mptcp: drop skb parameter of set_flags
-
[mptcp-next,v2,20/36] mptcp: add loc and rem for set_flags
-
[mptcp-next,v2,21/36] mptcp: update address type of get_local_id
-
[mptcp-next,v2,22/36] mptcp: change is_backup interfaces as get_flags
-
[mptcp-next,v2,23/36] mptcp: drop struct mptcp_pm_local
-
[mptcp-next,v2,24/36] mptcp: drop struct mptcp_pm_add_entry
-
[mptcp-next,v2,25/36] mptcp: change local type of subflow_destroy
-
[mptcp-next,v2,26/36] mptcp: hold pm lock when deleting entry
-
[mptcp-next,v2,27/36] mptcp: rename mptcp_pm_remove_addrs
-
[mptcp-next,v2,28/36] mptcp: drop free_list for deleting entries
-
[mptcp-next,v2,29/36] mptcp: define struct mptcp_pm_ops
-
[mptcp-next,v2,30/36] mptcp: implement userspace pm interfaces
-
[mptcp-next,v2,31/36] mptcp: register default userspace pm
-
[mptcp-next,v2,32/36] bpf: Add mptcp path manager struct_ops
-
[mptcp-next,v2,33/36] bpf: Register mptcp struct_ops kfunc set
-
[mptcp-next,v2,34/36] Squash to "bpf: Export mptcp packet scheduler helpers"
-
[mptcp-next,v2,35/36] selftests/bpf: Add mptcp userspace pm subtest
-
[mptcp-next,v2,36/36] selftests/bpf: Add mptcp bpf path manager subtest
|
From: Geliang Tang <tanggeliang@kylinos.cn> v2: - add BPF-related code in this set (32-36). In order to implement BPF userspace path manager, it is 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 userspace path manager like this: struct mptcp_pm_ops { int (*address_announce)(struct mptcp_sock *msk, struct mptcp_pm_addr_entry *local); int (*address_remove)(struct mptcp_sock *msk, u8 id); int (*subflow_create)(struct mptcp_sock *msk, struct mptcp_pm_addr_entry *local, struct mptcp_addr_info *remote); int (*subflow_destroy)(struct mptcp_sock *msk, struct mptcp_pm_addr_entry *local, struct mptcp_addr_info *remote); int (*get_local_id)(struct mptcp_sock *msk, struct mptcp_pm_addr_entry *local); u8 (*get_flags)(struct mptcp_sock *msk, struct mptcp_addr_info *skc); struct mptcp_pm_addr_entry *(*get_addr)(struct mptcp_sock *msk, u8 id); int (*dump_addr)(struct mptcp_sock *msk, struct mptcp_id_bitmap *bitmap); int (*set_flags)(struct mptcp_sock *msk, struct mptcp_pm_addr_entry *local, struct mptcp_addr_info *remote); u8 type; struct module *owner; struct list_head list; void (*init)(struct mptcp_sock *msk); void (*release)(struct mptcp_sock *msk); } ____cacheline_aligned_in_smp; Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/74 Depends on: - "add mptcp_address bpf_iter" v2 Based-on: <cover.1729582332.git.tanggeliang@kylinos.cn> Geliang Tang (36): mptcp: drop else in mptcp_pm_addr_families_match mptcp: use __lookup_addr in pm_netlink mptcp: add mptcp_for_each_address macros mptcp: use sock_kfree_s instead of kfree mptcp: add lookup_addr for userspace pm mptcp: add mptcp_userspace_pm_get_sock helper mptcp: make three pm wrappers static mptcp: drop skb parameter of get_addr mptcp: add id parameter for get_addr mptcp: add addr parameter for get_addr mptcp: reuse sending nlmsg code in get_addr mptcp: change info of get_addr as const mptcp: add struct mptcp_id_bitmap mptcp: refactor dump_addr with id bitmap mptcp: refactor dump_addr with get_addr mptcp: reuse sending nlmsg code in dump_addr mptcp: update local address flags when setting it mptcp: change rem type of set_flags mptcp: drop skb parameter of set_flags mptcp: add loc and rem for set_flags mptcp: update address type of get_local_id mptcp: change is_backup interfaces as get_flags mptcp: drop struct mptcp_pm_local mptcp: drop struct mptcp_pm_add_entry mptcp: change local type of subflow_destroy mptcp: hold pm lock when deleting entry mptcp: rename mptcp_pm_remove_addrs mptcp: drop free_list for deleting entries mptcp: define struct mptcp_pm_ops mptcp: implement userspace pm interfaces mptcp: register default userspace pm bpf: Add mptcp path manager struct_ops bpf: Register mptcp struct_ops kfunc set Squash to "bpf: Export mptcp packet scheduler helpers" selftests/bpf: Add mptcp userspace pm subtest selftests/bpf: Add mptcp bpf path manager subtest include/net/mptcp.h | 32 + net/mptcp/bpf.c | 377 ++++++++- net/mptcp/pm.c | 53 +- net/mptcp/pm_netlink.c | 313 +++---- net/mptcp/pm_userspace.c | 777 ++++++++++-------- net/mptcp/protocol.c | 1 + net/mptcp/protocol.h | 81 +- net/mptcp/subflow.c | 2 +- tools/testing/selftests/bpf/config | 1 + .../testing/selftests/bpf/prog_tests/mptcp.c | 305 +++++++ tools/testing/selftests/bpf/progs/mptcp_bpf.h | 71 ++ .../bpf/progs/mptcp_bpf_userspace_pm.c | 409 +++++++++ 12 files changed, 1855 insertions(+), 567 deletions(-) create mode 100644 tools/testing/selftests/bpf/progs/mptcp_bpf_userspace_pm.c