-
Notifications
You must be signed in to change notification settings - Fork 3.4k
loader: Attach bpf_host to cilium_net from Golang #11598
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
Conversation
This comment has been minimized.
This comment has been minimized.
bb2a2a9
to
bf7ce2e
Compare
bf7ce2e
to
c3a8d22
Compare
c3a8d22
to
d12a28e
Compare
Privileged unit tests need fixing 😞 |
289f009
to
543c95d
Compare
Attach bpf_host to the second host device (i.e., cilium_net) from Golang, as part of the host endpoint's datapath loading, instead of doing it from init.sh. Doing so has the following benefits: - We compile one less time because we only need to patch the object file on the Go side. - It simplifies the weird dance around includes in bpf_host.c. - It moves more code out of init.sh. Signed-off-by: Paul Chaignon <paul@cilium.io>
543c95d
to
e1ad5fe
Compare
I was initially planning to go the long road and add support for the full host endpoint compilation+loading in the unit tests, but I'd like to get this PR into v1.8. The compilation+loading is well covered in the e2e tests anyway. In a nutshell: the host endpoint is a bit peculiar because it compiles and attached one object file to the first device, then patches it to attach to subsequent devices. However, in the unit tests, we compile and load dummy object files (e.g., with |
retest-gke |
Attach
bpf_host
to the second host device (i.e.,cilium_net
) from Golang, as part of the host endpoint's datapath loading, instead of doing it frominit.sh
.Doing so has the following benefits:
on the Go side.
bpf_host.c
.init.sh
.