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

Function l2_flush

core/modules/l2_forward.cc:345–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343}
344
345static int l2_flush(struct l2_table *l2tbl) {
346 if (nullptr == l2tbl || nullptr == l2tbl->table) {
347 return -EINVAL;
348 }
349
350 memset(l2tbl->table, 0,
351 sizeof(struct l2_entry) * l2tbl->size * l2tbl->bucket);
352
353 return 0;
354}
355
356static uint64_t l2_addr_to_u64(char *addr) {
357 uint64_t a = *(reinterpret_cast<uint32_t *>(addr));

Callers 1

l2_forward_flush_testFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected