elastic / ebpf

Elastic's eBPF
Other
67 stars 11 forks source link

contrib: update libbpf to 0.6.1 #48

Closed fntlnz closed 2 years ago

fntlnz commented 2 years ago

Updating libbpf to 0.6.1 as its needed for the new features being developed in current main and in #47 .

I separated the commit with all the steps involved to make it easier to understand what is happenign here.

Most of the patching we needed to do is now gone because the features we needed have been upstreamed.

The only missing thing is the fix that @stanek-michal did with the maps closing. Michal, I feel I would like to encourage you to upstream that change, thank you 😍

To avoid any possible confusion I pushed the diff to my own libbpf fork so we can visualize what happens better

Supersedes #37

fntlnz commented 2 years ago

This is not working, investigating 🔍

stanek-michal commented 2 years ago

The only missing thing is the fix that @stanek-michal did with the maps closing. Michal, I feel I would like to encourage you to upstream that change, thank you 😍

Thanks for reminding me, I'll get on it!

This is not working, investigating 🔍

I think this removed the extra headers we copied in to get ARM64 to compile and to get it all to work with elftoolchain

fntlnz commented 2 years ago

ah you are correct @stanek-michal - I'll fix immediately, my diff didn't see it for some reason

fntlnz commented 2 years ago

oh yes yes @stanek-michal

image
fntlnz commented 2 years ago

@stanek-michal , just added the headers PTAL

fntlnz commented 2 years ago

Looks like just copying the headers is not enough, investigating 🔬

fntlnz commented 2 years ago

Ok everything works now. Triggering CI to make sure tests pass as well.

fntlnz commented 2 years ago

Looks like CI does not have the latest version of the toolchain available. We can probably merge this and test build again when build nodes have the toolchain.

fntlnz commented 2 years ago

I gave it a try and pushed a Jenkinsfile change (originally written by Michal) to download the new toolchain temporarly. We can remove that once build nodes are updated. I'll run jenkins now.

fntlnz commented 2 years ago

Thanks for the reviews @stanek-michal and @leodido - really appreciated.

I'll do some more checks and will merge this soon.

mmat11 commented 2 years ago

@stanek-michal FYI, the fd leak should now be fixed in libbpf, don't know in which version will be released though

https://lore.kernel.org/bpf/164787600977.20941.4773407661485029217.git-patchwork-notify@kernel.org/T/#t

stanek-michal commented 2 years ago

@stanek-michal FYI, the fd leak should now be fixed in libbpf, don't know in which version will be released though

https://lore.kernel.org/bpf/164787600977.20941.4773407661485029217.git-patchwork-notify@kernel.org/T/#t

Awesome, let's keep an eye on libbpf releases so we can pull the new version and remove our patch commits.