Skip to content

Commit

Permalink
samples/bpf: Reduce the sampling interval in xdp1_user
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
zhengchaoshao authored and anakryiko committed Apr 20, 2022
1 parent 127e7dc commit db69264
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/bpf/xdp1_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit db69264

Please sign in to comment.