projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
127e7dc
)
samples/bpf: Reduce the sampling interval in xdp1_user
author
Zhengchao Shao
<shaozhengchao@huawei.com>
Tue, 19 Apr 2022 11:47:46 +0000
(19:47 +0800)
committer
Andrii Nakryiko
<andrii@kernel.org>
Wed, 20 Apr 2022 21:58:29 +0000
(14:58 -0700)
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 <shaozhengchao@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link:
https://lore.kernel.org/bpf/20220419114746.291613-1-shaozhengchao@huawei.com
samples/bpf/xdp1_user.c
patch
|
blob
|
history
diff --git
a/samples/bpf/xdp1_user.c
b/samples/bpf/xdp1_user.c
index 288db3d3ee5f28080b6cd12e23de055c75cca246..ac370e638fa3d2f70bd74f5394c067ceca0b1dde 100644
(file)
--- 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;
}