MCPcopy Create free account
hub / github.com/NetSys/bess / FindEmptySlot

Method FindEmptySlot

core/utils/cuckoo_map.h:421–428  ·  view source on GitHub ↗

Return an empty slot index in the bucket

Source from the content-addressed store, hash-verified

419
420 // Return an empty slot index in the bucket
421 int FindEmptySlot(const Bucket& bucket) const {
422 for (int i = 0; i < kEntriesPerBucket; i++) {
423 if (bucket.hash_values[i] == 0) {
424 return i;
425 }
426 }
427 return -1;
428 }
429
430 // Return the slot index in the bucket that matches the primary hash_value
431 // and the actual key. Return -1 if not found.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected