* [PATCH bpf-next] selftests/bpf: Fix prog numbers in test_sockmap
@ 2024-05-17 6:21 Geliang Tang
2024-05-21 18:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 3+ messages in thread
From: Geliang Tang @ 2024-05-17 6:21 UTC (permalink / raw)
To: Andrii Nakryiko, Eduard Zingerman, Mykola Lysenko,
Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau, Song Liu,
Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
Hao Luo, Jiri Olsa, Shuah Khan
Cc: Geliang Tang, bpf, linux-kselftest
From: Geliang Tang <tanggeliang@kylinos.cn>
bpf_prog5 and bpf_prog7 are removed from progs/test_sockmap_kern.h in
commit d79a32129b21 ("bpf: Selftests, remove prints from sockmap tests"),
now there are only 9 progs in it, not 11:
SEC("sk_skb1")
int bpf_prog1(struct __sk_buff *skb)
SEC("sk_skb2")
int bpf_prog2(struct __sk_buff *skb)
SEC("sk_skb3")
int bpf_prog3(struct __sk_buff *skb)
SEC("sockops")
int bpf_sockmap(struct bpf_sock_ops *skops)
SEC("sk_msg1")
int bpf_prog4(struct sk_msg_md *msg)
SEC("sk_msg2")
int bpf_prog6(struct sk_msg_md *msg)
SEC("sk_msg3")
int bpf_prog8(struct sk_msg_md *msg)
SEC("sk_msg4")
int bpf_prog9(struct sk_msg_md *msg)
SEC("sk_msg5")
int bpf_prog10(struct sk_msg_md *msg)
This patch updates the array sizes of prog_fd[], prog_attach_type[] and
prog_type[] from 11 to 9 accordingly.
Fixes: d79a32129b21 ("bpf: Selftests, remove prints from sockmap tests")
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
tools/testing/selftests/bpf/test_sockmap.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_sockmap.c b/tools/testing/selftests/bpf/test_sockmap.c
index 92752f5eeded..4499b3cfc3a6 100644
--- a/tools/testing/selftests/bpf/test_sockmap.c
+++ b/tools/testing/selftests/bpf/test_sockmap.c
@@ -63,7 +63,7 @@ int passed;
int failed;
int map_fd[9];
struct bpf_map *maps[9];
-int prog_fd[11];
+int prog_fd[9];
int txmsg_pass;
int txmsg_redir;
@@ -1793,8 +1793,6 @@ int prog_attach_type[] = {
BPF_SK_MSG_VERDICT,
BPF_SK_MSG_VERDICT,
BPF_SK_MSG_VERDICT,
- BPF_SK_MSG_VERDICT,
- BPF_SK_MSG_VERDICT,
};
int prog_type[] = {
@@ -1807,8 +1805,6 @@ int prog_type[] = {
BPF_PROG_TYPE_SK_MSG,
BPF_PROG_TYPE_SK_MSG,
BPF_PROG_TYPE_SK_MSG,
- BPF_PROG_TYPE_SK_MSG,
- BPF_PROG_TYPE_SK_MSG,
};
static int populate_progs(char *bpf_file)
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH bpf-next] selftests/bpf: Fix prog numbers in test_sockmap
2024-05-17 6:21 [PATCH bpf-next] selftests/bpf: Fix prog numbers in test_sockmap Geliang Tang
@ 2024-05-21 18:20 ` patchwork-bot+netdevbpf
2024-05-22 8:17 ` Jakub Sitnicki
0 siblings, 1 reply; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-05-21 18:20 UTC (permalink / raw)
To: Geliang Tang
Cc: andrii, eddyz87, mykolal, ast, daniel, martin.lau, song,
yonghong.song, john.fastabend, kpsingh, sdf, haoluo, jolsa, shuah,
tanggeliang, bpf, linux-kselftest
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Fri, 17 May 2024 14:21:46 +0800 you wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> bpf_prog5 and bpf_prog7 are removed from progs/test_sockmap_kern.h in
> commit d79a32129b21 ("bpf: Selftests, remove prints from sockmap tests"),
> now there are only 9 progs in it, not 11:
>
> SEC("sk_skb1")
> int bpf_prog1(struct __sk_buff *skb)
> SEC("sk_skb2")
> int bpf_prog2(struct __sk_buff *skb)
> SEC("sk_skb3")
> int bpf_prog3(struct __sk_buff *skb)
> SEC("sockops")
> int bpf_sockmap(struct bpf_sock_ops *skops)
> SEC("sk_msg1")
> int bpf_prog4(struct sk_msg_md *msg)
> SEC("sk_msg2")
> int bpf_prog6(struct sk_msg_md *msg)
> SEC("sk_msg3")
> int bpf_prog8(struct sk_msg_md *msg)
> SEC("sk_msg4")
> int bpf_prog9(struct sk_msg_md *msg)
> SEC("sk_msg5")
> int bpf_prog10(struct sk_msg_md *msg)
>
> [...]
Here is the summary with links:
- [bpf-next] selftests/bpf: Fix prog numbers in test_sockmap
https://git.kernel.org/bpf/bpf-next/c/6c8d7598dfed
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH bpf-next] selftests/bpf: Fix prog numbers in test_sockmap
2024-05-21 18:20 ` patchwork-bot+netdevbpf
@ 2024-05-22 8:17 ` Jakub Sitnicki
0 siblings, 0 replies; 3+ messages in thread
From: Jakub Sitnicki @ 2024-05-22 8:17 UTC (permalink / raw)
To: patchwork-bot+netdevbpf
Cc: Geliang Tang, andrii, eddyz87, mykolal, ast, daniel, martin.lau,
song, yonghong.song, john.fastabend, kpsingh, sdf, haoluo, jolsa,
shuah, tanggeliang, bpf, linux-kselftest
On Tue, May 21, 2024 at 06:20 PM GMT, patchwork-bot+netdevbpf@kernel.org wrote:
> Hello:
>
> This patch was applied to bpf/bpf-next.git (master)
> by Andrii Nakryiko <andrii@kernel.org>:
>
> On Fri, 17 May 2024 14:21:46 +0800 you wrote:
>> From: Geliang Tang <tanggeliang@kylinos.cn>
>>
>> bpf_prog5 and bpf_prog7 are removed from progs/test_sockmap_kern.h in
>> commit d79a32129b21 ("bpf: Selftests, remove prints from sockmap tests"),
>> now there are only 9 progs in it, not 11:
>>
>> SEC("sk_skb1")
>> int bpf_prog1(struct __sk_buff *skb)
>> SEC("sk_skb2")
>> int bpf_prog2(struct __sk_buff *skb)
>> SEC("sk_skb3")
>> int bpf_prog3(struct __sk_buff *skb)
>> SEC("sockops")
>> int bpf_sockmap(struct bpf_sock_ops *skops)
>> SEC("sk_msg1")
>> int bpf_prog4(struct sk_msg_md *msg)
>> SEC("sk_msg2")
>> int bpf_prog6(struct sk_msg_md *msg)
>> SEC("sk_msg3")
>> int bpf_prog8(struct sk_msg_md *msg)
>> SEC("sk_msg4")
>> int bpf_prog9(struct sk_msg_md *msg)
>> SEC("sk_msg5")
>> int bpf_prog10(struct sk_msg_md *msg)
>>
>> [...]
>
> Here is the summary with links:
> - [bpf-next] selftests/bpf: Fix prog numbers in test_sockmap
> https://git.kernel.org/bpf/bpf-next/c/6c8d7598dfed
>
> You are awesome, thank you!
We don't need prog_types and attach_types at all.
I was too late too comment so here's a patch to address that:
https://lore.kernel.org/bpf/20240522080936.2475833-1-jakub@cloudflare.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-22 8:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-17 6:21 [PATCH bpf-next] selftests/bpf: Fix prog numbers in test_sockmap Geliang Tang
2024-05-21 18:20 ` patchwork-bot+netdevbpf
2024-05-22 8:17 ` Jakub Sitnicki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox