Skip to content

Support array presets in veristat #5486

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: bpf-next_base
Choose a base branch
from

Conversation

kernel-patches-daemon-bpf-rc[bot]
Copy link

Pull request for series with
subject: Support array presets in veristat
version: 4
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=973580

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: cd7312a
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=973580
version: 4

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: cd7312a
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=973580
version: 4

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: cd7312a
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=973580
version: 4

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: e30329b
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=973580
version: 4

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: e30329b
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=973580
version: 4

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 99fe8af
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=973580
version: 4

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: c11f34e
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=973580
version: 4

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 3ce7cdd
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=973580
version: 4

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 3ce7cdd
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=973580
version: 4

mykyta5 added 3 commits June 24, 2025 11:27
Refactor var preset parsing in veristat to simplify implementation.
Prepare parsed variable beforehand so that parsing logic is separated
from functionality of calculating offsets and searching fields.
Introduce rvalue struct, storing either int or enum (string value),
will be reused in the next patch, extract parsing rvalue into a
separate function.

Signed-off-by: Mykyta Yatsenko <[email protected]>
Acked-by: Eduard Zingerman <[email protected]>
Implement support for presetting values for array elements in veristat.
For example:
```
sudo ./veristat set_global_vars.bpf.o -G "arr[3] = 1"
```
Arrays of structures and structure of arrays work, but each individual
scalar value has to be set separately: `foo[1].bar[2] = value`.

Signed-off-by: Mykyta Yatsenko <[email protected]>
Acked-by: Eduard Zingerman <[email protected]>
Modify existing veristat tests to verify that array presets are applied
as expected.
Introduce few negative tests as well to check that common error modes
are handled.

Signed-off-by: Mykyta Yatsenko <[email protected]>
Acked-by: Eduard Zingerman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant