-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
maps: Handle
GetValueAndDeleteBatch
return code appropiately
Long story short, some libbpf APIs that don't return pointers, such as the batch APIs might return `-1` when there's a 'partial success'. In the case of these APIs, with errno=ENOENT, we know that we read and deleted less than `count` entries, but it was still overall sucessful. There's more background in the inline comments). We are unfortunately breaking the API but I think it's needed. Happy to hear your feedback! :D This PR fixes this for `GetValueAndDeleteBatch` only. We aren't addressing all the other batch calls yet as we haven't used them yet. Thanks!
- Loading branch information
1 parent
64458ba
commit 420f323
Showing
2 changed files
with
73 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters