bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] sample: bpf: syscall_tp_user: print result of verify_map
@ 2022-04-02  8:57 Song Chen
  2022-04-04 21:50 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Song Chen @ 2022-04-02  8:57 UTC (permalink / raw)
  To: ast, daniel, andrii, kafai, songliubraving, yhs, john.fastabend,
	kpsingh, netdev, bpf, linux-kernel
  Cc: Song Chen

At the end of the test, we already print out
    prog <prog number>: map ids <...> <...>
Value is the number read from kernel through bpf map, further print out
    verify map:<map id> val:<...>
will help users to understand the program runs successfully.

Signed-off-by: Song Chen <chensong_2000@189.cn>
---
 samples/bpf/syscall_tp_user.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/samples/bpf/syscall_tp_user.c b/samples/bpf/syscall_tp_user.c
index a0ebf1833ed3..c55383068384 100644
--- a/samples/bpf/syscall_tp_user.c
+++ b/samples/bpf/syscall_tp_user.c
@@ -36,6 +36,9 @@ static void verify_map(int map_id)
 		fprintf(stderr, "failed: map #%d returns value 0\n", map_id);
 		return;
 	}
+
+	printf("verify map:%d val: %d\n", map_id, val);
+
 	val = 0;
 	if (bpf_map_update_elem(map_id, &key, &val, BPF_ANY) != 0) {
 		fprintf(stderr, "map_update failed: %s\n", strerror(errno));
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] sample: bpf: syscall_tp_user: print result of verify_map
  2022-04-02  8:57 [PATCH v2] sample: bpf: syscall_tp_user: print result of verify_map Song Chen
@ 2022-04-04 21:50 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-04-04 21:50 UTC (permalink / raw)
  To: Song Chen
  Cc: ast, daniel, andrii, kafai, songliubraving, yhs, john.fastabend,
	kpsingh, netdev, bpf, linux-kernel

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:

On Sat,  2 Apr 2022 16:57:08 +0800 you wrote:
> At the end of the test, we already print out
>     prog <prog number>: map ids <...> <...>
> Value is the number read from kernel through bpf map, further print out
>     verify map:<map id> val:<...>
> will help users to understand the program runs successfully.
> 
> Signed-off-by: Song Chen <chensong_2000@189.cn>
> 
> [...]

Here is the summary with links:
  - [v2] sample: bpf: syscall_tp_user: print result of verify_map
    https://git.kernel.org/bpf/bpf-next/c/35f91d1fe106

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] 2+ messages in thread

end of thread, other threads:[~2022-04-04 22:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-02  8:57 [PATCH v2] sample: bpf: syscall_tp_user: print result of verify_map Song Chen
2022-04-04 21:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).