-
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
Per CPU map needed API and selftest #156
Per CPU map needed API and selftest #156
Conversation
b0207b7
to
3a5a471
Compare
libbpfgo.go
Outdated
@@ -630,6 +638,15 @@ func (b *BPFMap) GetValue(key unsafe.Pointer) ([]byte, error) { | |||
return value, nil | |||
} | |||
|
|||
func (b *BPFMap) GetValue2(key unsafe.Pointer, value *[]byte) error { |
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.
Is it possible to have a better name than GetValue2
? And also adding a documentation to explain the need of the additional method would be awesome!
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.
Hahaha yes, I forgot that I pushed it with that name. I'll update it, thanks for your reviews @kakkoyun !
libbpf just merged high level apis for accessing maps, which includes built in API for reading from per-cpu maps. This should be changed over to use that API (though it hasn't been released yet) |
3a5a471
to
40048ec
Compare
These have been release in v0.8,
|
Signed-off-by: grantseltzer <[email protected]>
Signed-off-by: grantseltzer <[email protected]>
slice for the map lookup to read into Signed-off-by: grantseltzer <[email protected]>
Signed-off-by: grantseltzer <[email protected]>
Signed-off-by: grantseltzer <[email protected]>
3d125fa
to
2a2b260
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.
LGTM. Make sure to squash needed commits and dont duplicate "Signed off by" lines in git log! Thanks!
No description provided.