Skip to content

Commit d9c611a

Browse files
fixup! Add files for performance test
1 parent dea1a31 commit d9c611a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

samples/bpf/xdplua_user.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,10 @@ static void poll(int map_fd, int interval, int duration) {
117117
bpf_map_lookup_elem(map_fd, &key, cnts);
118118
for (i = 0; i < nr_cpus; ++i) {
119119
cnt += cnts[i];
120+
cnts[i] = 0;
120121
}
122+
bpf_map_update_elem(map_fd, &key, cnts, BPF_ANY);
123+
121124
printf("%lu\n", cnt);
122125
sleep(interval);
123126
}

0 commit comments

Comments
 (0)