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. For more more background see the inline comments. 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 81933ce
Showing
2 changed files
with
76 additions
and
23 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