8000 Provide struct bpf_timer forward declaration along with vmlinux.h by rhdxmr · Pull Request #223 · foniod/redbpf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Provide struct bpf_timer forward declaration along with vmlinux.h #223

Merged
merged 1 commit into from
Nov 16, 2021

Conversation

rhdxmr
Copy link
Collaborator
@rhdxmr rhdxmr commented Nov 15, 2021

Resolve the problem of struct bpf_timer redefinition reported by issue #218

Signed-off-by: Junyeong Jeong <rhdxmr@gmail.com>
Copy link
Collaborator
@rsdy rsdy left a comment

Choose a reason for hiding this comment

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

Just out of interest, do you think we have coverage for actually testing this code in the current matrix? I just want to avoid a situation where this accidentally breaks something while fixing it for the newer kernels.

@rhdxmr
Copy link
Collaborator Author
rhdxmr commented Nov 16, 2021

@rsdy
I think I don't comprehend what you asked to me because of lack of my English skills.

This change only affect the procedure that makes use of vmlinux.
I tested the modified code with kernel 5.15 that started to include struct bpf_timer in the vmlinux for the first time. I also tested it with kernel 5.13 that does not have struct bpf_timer in the vmlinux. And the ubuntu-2104-build-test tests generating rust bindings with vmlinux of the Linux kernel v5.11.

This PR just moves struct bpf_timer; from vmlinux_supplement.h to right after the vmlinux.h. It is just a forward declaration and there is no problem even if there exists real definition of struct bpf_timer in the vmlinux.h.

So I think it's okay to merge this PR.

@rsdy rsdy merged commit d05b729 into main Nov 16, 2021
@rsdy rsdy deleted the fix-vmlinux branch November 16, 2021 11:21
@rsdy
Copy link
Collaborator
rsdy commented Nov 16, 2021

@rhdxmr Yeah, that was my question. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0