Skip to content

Commit

Permalink
TODO
Browse files Browse the repository at this point in the history
Signed-off-by: Geliang Tang <[email protected]>
  • Loading branch information
Geliang Tang committed Jan 2, 2025
1 parent eeec0c9 commit 80cb589
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
5 changes: 4 additions & 1 deletion net/mptcp/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions net/mptcp/pm_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions net/mptcp/pm_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion tools/testing/selftests/bpf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 7 additions & 5 deletions tools/testing/selftests/bpf/prog_tests/mptcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand All @@ -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"))
Expand Down

0 comments on commit 80cb589

Please sign in to comment.