Skip to content

Commit db69264

Browse files
zhengchaoshaoanakryiko
authored andcommitted
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 <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 127e7dc commit db69264

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

samples/bpf/xdp1_user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ int main(int argc, char **argv)
160160
}
161161
prog_id = info.id;
162162

163-
poll_stats(map_fd, 2);
163+
poll_stats(map_fd, 1);
164164

165165
return 0;
166166
}

0 commit comments

Comments
 (0)