Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Multi-line comment violates the BPF subsystem comment style guidelines.
--
--- Patch [2]: [PATCH 2/2] selftests/bpf: add test for blkcg io.stat BPF kfuncs ---
commit 0012ecaba2bee2bf79e38a8039b4f591d01a624b
Author: Ziyang Men <[email protected]>
selftests/bpf: add test for blkcg io.stat BPF kfuncs
This commit adds a cgroup_iter_io selftest for the block I/O controller
BPF kfuncs. It uses a BPF iterator program to flush stats and read io.stat
counters for a target device, comparing the results against the cgroup's
io.stat file. It also validates the root cgroup's block stats.
> diff --git a/tools/testing/selftests/bpf/progs/cgroup_iter_io.c b/tools/testing/selftests/bpf/progs/cgroup_iter_io.c
> new file mode 100644
> index 0000000000000..b839def945086
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/progs/cgroup_iter_io.c
[ ... ]
> +/* Set to 1 by cgroup_root_blkcg_query when bpf_get_root_blkcg() succeeds. */
> +__u64 got_root_blkcg SEC(".data.query");
> +
> +/* Device to read, set by userspace (kernel dev_t). Pinning the device keeps
> + * the read deterministic and lets the value be compared to io.stat exactly.
> + */
> +__u64 target_dev SEC(".data.query");
[Severity: Low]
This isn't a bug, but does this multi-line comment follow the preferred
BPF subsystem formatting rules?
The guidelines for files under the BPF subsystem require the opening /*
to be placed on its own line before the text begins for multi-line comments.
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.