[PATCH mptcp-next 00/33] BPF path manager, part 1

Geliang Tang posted 33 patches 6 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/cover.1729069853.git.tanggeliang@kylinos.cn
There is a newer version of this series
include/net/mptcp.h      |  32 ++
net/mptcp/pm.c           |  49 +--
net/mptcp/pm_netlink.c   | 313 ++++++++--------
net/mptcp/pm_userspace.c | 768 +++++++++++++++++++++------------------
net/mptcp/protocol.c     |   1 +
net/mptcp/protocol.h     |  77 ++--
net/mptcp/subflow.c      |   2 +-
7 files changed, 681 insertions(+), 561 deletions(-)
[PATCH mptcp-next 00/33] BPF path manager, part 1
Posted by Geliang Tang 6 months, 2 weeks ago
From: Geliang Tang <tanggeliang@kylinos.cn>

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;

The BPF-related code will be sent in the next set part 2.

Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/74

Geliang Tang (33):
  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 address interfaces
  mptcp: implement userspace pm subflow interfaces
  mptcp: implement userspace pm others interfaces
  mptcp: register default userspace pm

 include/net/mptcp.h      |  32 ++
 net/mptcp/pm.c           |  49 +--
 net/mptcp/pm_netlink.c   | 313 ++++++++--------
 net/mptcp/pm_userspace.c | 768 +++++++++++++++++++++------------------
 net/mptcp/protocol.c     |   1 +
 net/mptcp/protocol.h     |  77 ++--
 net/mptcp/subflow.c      |   2 +-
 7 files changed, 681 insertions(+), 561 deletions(-)

-- 
2.43.0
Re: [PATCH mptcp-next 00/33] BPF path manager, part 1
Posted by MPTCP CI 6 months, 2 weeks ago
Hi Geliang,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal: Success! ✅
- KVM Validation: debug: Unstable: 1 failed test(s): mptcp_connect_mmap 🔴
- KVM Validation: btf (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/11363009388

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/d7dcbd82b26f
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=899688


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)