From 80cb5895594123051b91177c82290ba22eb3c364 Mon Sep 17 00:00:00 2001 From: Geliang Tang Date: Thu, 2 Jan 2025 08:56:38 +0800 Subject: [PATCH] TODO Signed-off-by: Geliang Tang --- net/mptcp/pm.c | 5 ++++- net/mptcp/pm_netlink.c | 1 + net/mptcp/pm_userspace.c | 2 ++ tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/prog_tests/mptcp.c | 12 +++++++----- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c index f182b8fb333e..efcff130e6e8 100644 --- a/net/mptcp/pm.c +++ b/net/mptcp/pm.c @@ -414,8 +414,11 @@ int mptcp_pm_get_local_id(struct mptcp_sock *msk, struct sock_common *skc) */ mptcp_local_address((struct sock_common *)msk, &msk_local); mptcp_local_address((struct sock_common *)skc, &skc_local.addr); - if (mptcp_addresses_equal(&msk_local, &skc_local.addr, false)) + pr_info("%s msk_local=%u(%pI4) skc_local.addr=%u(%pI4)\n", __func__, msk_local.id, &msk_local, skc_local.addr.id, &skc_local.addr); + if (mptcp_addresses_equal(&msk_local, &skc_local.addr, false)) { + pr_info("%s return 0\n", __func__); return 0; + } skc_local.addr.id = 0; skc_local.flags = MPTCP_PM_ADDR_FLAG_IMPLICIT; diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index c9fc54a71bcf..e97c8a6e5440 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -1138,6 +1138,7 @@ int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk, struct pm_nl_pernet *pernet; int ret; + pr_info("%s\n", __func__); pernet = pm_nl_get_pernet_from_msk(msk); rcu_read_lock(); diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c index 5e8b96897b2c..2d2bc03b341f 100644 --- a/net/mptcp/pm_userspace.c +++ b/net/mptcp/pm_userspace.c @@ -142,6 +142,7 @@ static int userspace_pm_get_local_id(struct mptcp_sock *msk, inet_sk((struct sock *)msk))->inet_sport; struct mptcp_pm_addr_entry *entry; + pr_info("%s\n", __func__); spin_lock_bh(&msk->pm.lock); entry = mptcp_userspace_pm_lookup_addr(msk, &local->addr); spin_unlock_bh(&msk->pm.lock); @@ -157,6 +158,7 @@ static int userspace_pm_get_local_id(struct mptcp_sock *msk, int mptcp_userspace_pm_get_local_id(struct mptcp_sock *msk, struct mptcp_pm_addr_entry *local) { + pr_info("%s\n", __func__); return msk->pm.ops->get_local_id ? msk->pm.ops->get_local_id(msk, local) : userspace_pm_get_local_id(msk, local); diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 2414016ea6a4..f9d5c0fefeb6 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -42,7 +42,7 @@ srctree := $(patsubst %/,%,$(dir $(srctree))) endif CFLAGS += -g $(OPT_FLAGS) -rdynamic \ - -Wall -Werror -fno-omit-frame-pointer \ + -Werror -fno-omit-frame-pointer \ $(GENFLAGS) $(SAN_CFLAGS) $(LIBELF_CFLAGS) \ -I$(CURDIR) -I$(INCLUDE_DIR) -I$(GENDIR) -I$(LIBDIR) \ -I$(TOOLSINCDIR) -I$(TOOLSARCHINCDIR) -I$(APIDIR) -I$(OUTPUT) diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c index 800b961187e8..22e01ddcf7ac 100644 --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c @@ -1545,9 +1545,9 @@ static void test_stale(void) void test_mptcp(void) { +#if 0 if (test__start_subtest("connect")) test_connect(); -#if 1 if (test__start_subtest("base")) test_base(); if (test__start_subtest("mptcpify")) @@ -1556,12 +1556,14 @@ void test_mptcp(void) test_subflow(); if (test__start_subtest("iters_subflow")) test_iters_subflow(); - if (test__start_subtest("iters_address")) - test_iters_address(); - if (test__start_subtest("userspace_pm")) - test_userspace_pm(); + //if (test__start_subtest("iters_address")) + // test_iters_address(); + //if (test__start_subtest("userspace_pm")) + // test_userspace_pm(); +#endif if (test__start_subtest("bpf_path_manager")) test_bpf_path_manager(); +#if 0 if (test__start_subtest("sockopt")) test_sockopt(); if (test__start_subtest("default"))