From: Amery Hung <ameryhung@gmail.com>
To: bpf@vger.kernel.org
Cc: netdev@vger.kernel.org, alexei.starovoitov@gmail.com,
andrii@kernel.org, daniel@iogearbox.net, martin.lau@kernel.org,
xiyou.wangcong@gmail.com, kernel-team@meta.com
Subject: [PATCH bpf-next/net v1 5/5] selftests/bpf: Cleanup bpf qdisc selftests
Date: Thu, 1 May 2025 15:30:25 -0700 [thread overview]
Message-ID: <20250501223025.569020-6-ameryhung@gmail.com> (raw)
In-Reply-To: <20250501223025.569020-1-ameryhung@gmail.com>
Some cleanups:
- Remove unnecessary kfuncs declaration
- Use _ns in the test name to run tests in a separate net namespace
Signed-off-by: Amery Hung <ameryhung@gmail.com>
---
tools/testing/selftests/bpf/prog_tests/bpf_qdisc.c | 10 +---------
tools/testing/selftests/bpf/progs/bpf_qdisc_common.h | 6 ------
2 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_qdisc.c b/tools/testing/selftests/bpf/prog_tests/bpf_qdisc.c
index 8afaf71cfadd..2c10816c2d9e 100644
--- a/tools/testing/selftests/bpf/prog_tests/bpf_qdisc.c
+++ b/tools/testing/selftests/bpf/prog_tests/bpf_qdisc.c
@@ -249,14 +249,8 @@ static void test_default_qdisc_attach_to_mq(void)
bpf_qdisc_fifo__destroy(fifo_skel);
}
-void test_bpf_qdisc(void)
+void test_ns_bpf_qdisc(void)
{
- struct netns_obj *netns;
-
- netns = netns_new("bpf_qdisc_ns", true);
- if (!ASSERT_OK_PTR(netns, "netns_new"))
- return;
-
if (test__start_subtest("fifo"))
test_fifo();
if (test__start_subtest("fq"))
@@ -267,8 +261,6 @@ void test_bpf_qdisc(void)
test_qdisc_attach_to_non_root();
if (test__start_subtest("incompl_ops"))
test_incompl_ops();
-
- netns_free(netns);
}
void serial_test_bpf_qdisc_default(void)
diff --git a/tools/testing/selftests/bpf/progs/bpf_qdisc_common.h b/tools/testing/selftests/bpf/progs/bpf_qdisc_common.h
index 65a2c561c0bb..c495da1c43db 100644
--- a/tools/testing/selftests/bpf/progs/bpf_qdisc_common.h
+++ b/tools/testing/selftests/bpf/progs/bpf_qdisc_common.h
@@ -12,12 +12,6 @@
#define private(name) SEC(".data." #name) __hidden __attribute__((aligned(8)))
-u32 bpf_skb_get_hash(struct sk_buff *p) __ksym;
-void bpf_kfree_skb(struct sk_buff *p) __ksym;
-void bpf_qdisc_skb_drop(struct sk_buff *p, struct bpf_sk_buff_ptr *to_free) __ksym;
-void bpf_qdisc_watchdog_schedule(struct Qdisc *sch, u64 expire, u64 delta_ns) __ksym;
-void bpf_qdisc_bstats_update(struct Qdisc *sch, const struct sk_buff *skb) __ksym;
-
static struct qdisc_skb_cb *qdisc_skb_cb(const struct sk_buff *skb)
{
return (struct qdisc_skb_cb *)skb->cb;
--
2.47.1
next prev parent reply other threads:[~2025-05-01 22:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-01 22:30 [PATCH bpf-next/net v1 0/5] Fix bpf qdisc bugs and cleanup Amery Hung
2025-05-01 22:30 ` [PATCH bpf-next/net v1 1/5] bpf: net_sched: Fix bpf qdisc init prologue when set as default qdisc Amery Hung
2025-05-02 9:32 ` Simon Horman
2025-05-01 22:30 ` [PATCH bpf-next/net v1 2/5] selftests/bpf: Test setting and creating bpf qdisc " Amery Hung
2025-05-01 23:58 ` Martin KaFai Lau
2025-05-02 17:52 ` Amery Hung
2025-05-02 19:27 ` Martin KaFai Lau
2025-05-02 19:33 ` Amery Hung
2025-05-01 22:30 ` [PATCH bpf-next/net v1 3/5] bpf: net_sched: Make some Qdisc_ops ops mandatory Amery Hung
2025-05-02 0:13 ` Martin KaFai Lau
2025-05-01 22:30 ` [PATCH bpf-next/net v1 4/5] selftests/bpf: selftests/bpf: Test attaching a bpf qdisc with incomplete operators Amery Hung
2025-05-01 22:30 ` Amery Hung [this message]
2025-05-02 0:22 ` [PATCH bpf-next/net v1 5/5] selftests/bpf: Cleanup bpf qdisc selftests Martin KaFai Lau
2025-05-02 17:53 ` Amery Hung
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250501223025.569020-6-ameryhung@gmail.com \
--to=ameryhung@gmail.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@meta.com \
--cc=martin.lau@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.