commit | ffb0ccd04bc3505f20827a0bfcf7a7060dfd4d89 | [log] [tgz] |
---|---|---|
author | Lorenzo Colitti <lorenzo@google.com> | Wed Feb 24 12:15:50 2021 +0900 |
committer | Lorenzo Colitti <lorenzo@google.com> | Wed Feb 24 06:09:46 2021 +0000 |
tree | 9db88d0262cec23fcc259e5f2180a30aad4899d9 | |
parent | 2be434ab12406ca0480ac72bdf94751ddcb85dd6 [diff] |
Add a BpfMap#clear method. A caller can mostly already do this via forEach(), but having a specific method is faster (since the code does not need to read the value) and easier to use. The semantics of this method (e.g., ignore ENOENT while deleting a key, but throw on any other error) match those of the native BpfMap::clear method. Test: new unit tests Change-Id: I5cd32efd0f87c823cd2d0a2fa3a95a83093fb6f9