Skip to content

Commit 36dd2e9

Browse files
committed
Make userspace prog report the recorded latencies
Add functionality to the user space component to periodically fetch the BPF maps netstacklat records the values in and print them out. Base the core program loop on the same setup as pping, where a single epoll instance is used to support multiple different types of events. So far it only deals with signal handling (for clean shutdown) plus a timer (for periodical reporting), but the setup can easily be extended if the program grows more complex in the future. Use the (somewhat complicated) bpf_map_lookup_batch to fetch the entire histogram maps in a single system call (instead of performing a lookup for each bin index individually). Signed-off-by: Simon Sundberg <[email protected]>
1 parent 5d8afb2 commit 36dd2e9

File tree

2 files changed

+443
-11
lines changed

2 files changed

+443
-11
lines changed

netstacklat/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ BPF_TARGETS := netstacklat.bpf
55
BPF_SKEL_OBJ := netstacklat.bpf.o
66

77
EXTRA_DEPS += netstacklat.h bits.bpf.h maps.bpf.h
8+
LDLIBS += -lm
89

910
LIB_DIR = ../lib
1011

0 commit comments

Comments
 (0)