Skip to content
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

Small rusty cleanup #228

Merged
merged 4 commits into from
Apr 12, 2024
Merged

Small rusty cleanup #228

merged 4 commits into from
Apr 12, 2024

Conversation

Byte-Lab
Copy link
Contributor

Noticed a few things that could be cleaned up and/or fixed. Mostly just gets rid of
ugly boilerplate, but also fixes some issues that for some reason the compiler
wasn't noticing; like unused variables, and improper print formatting.

There are some random issues in the code, like unused variables, and bad
print formatters. I'm not sure why the compiler isn't consistently
complaining, but let's fix them.

Signed-off-by: David Vernet <[email protected]>
We have a lot of boilerplate code where we create a cpumask, initialize
it, and then bpf_kptr_xchg() it into the map. In an effort to slightly
reduce the amount of boilerplate, let's create a helper that can
alleviate some of it.

Signed-off-by: David Vernet <[email protected]>
It doesn't need to be a global prog. Let's make it static.

Signed-off-by: David Vernet <[email protected]>
Getting rid of more boilerplate

Signed-off-by: David Vernet <[email protected]>
@Byte-Lab Byte-Lab requested a review from htejun April 12, 2024 00:31
@Byte-Lab Byte-Lab merged commit 5404303 into main Apr 12, 2024
1 check passed
@Byte-Lab Byte-Lab deleted the refactor branch April 12, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants