From: Geliang Tang <tanggeliang@kylinos.cn>
Use new netns helpers.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
tools/testing/selftests/bpf/prog_tests/mptcp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c
index 8db1def2e219..1d68bbda3370 100644
--- a/tools/testing/selftests/bpf/prog_tests/mptcp.c
+++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c
@@ -651,7 +651,7 @@ static void test_bpf_sched(struct bpf_object *obj, char *sched,
bool addr1, bool addr2)
{
char bpf_sched[MPTCP_SCHED_NAME_MAX] = "bpf_";
- struct nstoken *nstoken;
+ struct netns_obj *netns;
struct bpf_link *link;
struct bpf_map *map;
@@ -664,14 +664,14 @@ static void test_bpf_sched(struct bpf_object *obj, char *sched,
if (CHECK(!link, sched, "attach_struct_ops: %d\n", errno))
return;
- nstoken = sched_init("subflow", strcat(bpf_sched, sched));
- if (!nstoken)
+ netns = sched_init("subflow", strcat(bpf_sched, sched));
+ if (!netns)
goto fail;
send_data_and_verify(sched, addr1, addr2);
fail:
- cleanup_netns(nstoken);
+ netns_free(netns);
bpf_link__destroy(link);
}
--
2.45.2