-
Notifications
You must be signed in to change notification settings - Fork 95
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
Update libbpf to v1.0.0 #216
Conversation
0443742
to
e285a0b
Compare
This is great! Just as a reminder for folks migrating their application to libbpf v1, the strict mode API we added in #160 can be very useful to ensure a smooth transition |
Thanks @saschagrunert ! I'm really excited for this, hoping to have time to review and merge this by EOD tomorrow and a new release sometime next week once we're sure we've removed everything that's deprecated and firmly standardized error checking the way 1.0 does it. I'll also share publicly our roadmap towards libbpfgo 1.0 which will certainly have to include a full implementation of the libbpf API. I gotta setup a public office hours so we (all contributors/maintainers) can discuss that and other exciting things we can do such as being part of the libbpf project more officially. Will keep you posted! |
And things that don't need documentation can also be discussed in Slack (#libbpfgo), as long as we also keep track of things in github (Always). |
As Parca Agent maintainers, we would be more than happy to give a hand on this effort.
❤️ It will be amazing to have office hours! |
I'm presently going through libbpfgo to make sure we're not using any now removed APIs and are handling errors correctly. There's also a bunch of new APIs and things that we can do differently in 1.0 that'll i'm going to be creating issues for but won't hold up this PR (but will be before the next libbpfgo release). |
❤️
Will let you know very soon! |
Alright I've opened #225 which we'll merge at the same time as this one. For some reason github doesn't let me tag people out of the aqua org for review but @kakkoyun @javierhonduco @saschagrunert your feedback is always greatly appreciated! |
@@ -1031,7 +1031,7 @@ func (it *BPFMapIterator) Next() bool { | |||
nextPtr := unsafe.Pointer(&next[0]) | |||
|
|||
errC, err := C.bpf_map_get_next_key(it.b.fd, prevPtr, nextPtr) | |||
if errno, ok := err.(syscall.Errno); errC == -1 && ok && errno == C.ENOENT { | |||
if errno, ok := err.(syscall.Errno); errC == -2 && ok && errno == C.ENOENT { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the return code for the function call, the iterator test failed because of this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it! I see now. i guess it's redundant to check errno == C.ENOENT
and errC = -2
. Do you think we should simplify to just the following?:
if errno, ok := err.(syscall.Errno); errC == -2 && ok && errno == C.ENOENT { | |
if errC == -2 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually outside the scope of this PR, so I'd say leave it for now and we can reassess before the next release
Updates libbpf to the latest release: https://github.com/libbpf/libbpf/releases/tag/v1.0.0 Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
e285a0b
to
aaaa25c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do this!
Thanks again @saschagrunert, Ill be looking to cut a release by middle of next week. |
Updates libbpf to the latest release: https://github.com/libbpf/libbpf/releases/tag/v1.0.0