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

scx_bpfland: Remove the usage of cast_mask in bpfland_enqueue #663

Merged
merged 1 commit into from
Sep 21, 2024

Conversation

vax-r
Copy link
Contributor

@vax-r vax-r commented Sep 19, 2024

Summary

The usage of cast_mask() within bpfland_enqueue aims to cast the type of "p->cpus_ptr" from "struct bpf_cpumask *" to "const struct cpumask *". However, the type of "p->cpus_ptr" is already "const cpumask_t *" aka "const struct cpumask *", so no conversion is needed.

Moreover, passing a value of type "struct cpumask *" into "struct bpf_cpumask *" leads to compiling error.

Copy link
Contributor

@arighi arighi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but can you drop the changes to Cargo.lock, so that we can only have the cast_mask change applied with this PR? Thanks!

The usage of cast_mask() within bpfland_enqueue aims to cast the type of
"p->cpus_ptr" from "struct bpf_cpumask *" to "const struct cpumask *".
However, the type of "p->cpus_ptr" is already "const cpumask_t *" aka
"const struct cpumask *", so no conversion is needed.

Passing a value of type "struct cpumask *" into "struct bpf_cpumask *"
also leads to compiling error.

Signed-off-by: I Hsin Cheng <[email protected]>
@vax-r vax-r changed the title sx_bpfland: Remove the usage of cast_mask in bpfland_enqueue scx_bpfland: Remove the usage of cast_mask in bpfland_enqueue Sep 20, 2024
@vax-r
Copy link
Contributor Author

vax-r commented Sep 20, 2024

@arighi -
No problem ! I've made the requested change, please take a look while you're available.

@vax-r vax-r requested a review from arighi September 20, 2024 13:16
@arighi arighi merged commit 897977b into sched-ext:main Sep 21, 2024
2 checks passed
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