Skip to content

Commit

Permalink
fixup! Add files for performance test
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorNogueiraRio committed Nov 17, 2020
1 parent dea1a31 commit d9c611a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions samples/bpf/xdplua_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ static void poll(int map_fd, int interval, int duration) {
bpf_map_lookup_elem(map_fd, &key, cnts);
for (i = 0; i < nr_cpus; ++i) {
cnt += cnts[i];
cnts[i] = 0;
}
bpf_map_update_elem(map_fd, &key, cnts, BPF_ANY);

printf("%lu\n", cnt);
sleep(interval);
}
Expand Down

0 comments on commit d9c611a

Please sign in to comment.