From db69264f983a5890fe8ba20ed4c20dfd4b687615 Mon Sep 17 00:00:00 2001 From: Zhengchao Shao Date: Tue, 19 Apr 2022 19:47:46 +0800 Subject: samples/bpf: Reduce the sampling interval in xdp1_user If interval is 2, and sum - prev[key] = 1, the result = 0. This will mislead the tester that the port has no traffic right now. So reduce the sampling interval to 1. Signed-off-by: Zhengchao Shao Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220419114746.291613-1-shaozhengchao@huawei.com --- samples/bpf/xdp1_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'samples/bpf') diff --git a/samples/bpf/xdp1_user.c b/samples/bpf/xdp1_user.c index 288db3d3ee5f..ac370e638fa3 100644 --- a/samples/bpf/xdp1_user.c +++ b/samples/bpf/xdp1_user.c @@ -160,7 +160,7 @@ int main(int argc, char **argv) } prog_id = info.id; - poll_stats(map_fd, 2); + poll_stats(map_fd, 1); return 0; } -- cgit v1.2.3