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

Function find_index_basic

core/modules/l2_forward.cc:139–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138#else
139static inline int find_index_basic(uint64_t addr, uint64_t *table) {
140 for (int i = 0; i < 4; i++) {
141 if ((addr | (1ull << 63)) == (table[i] & 0x8000ffffFFFFffffull)) {
142 return i + 1;
143 }
144 }
145
146 return 0;
147}
148#endif
149
150// Finds addr from a 4-way bucket *table and returns its index + 1.

Callers 1

find_indexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected