MCPcopy Create free account
hub / github.com/F-Stack/f-stack / get_unique_name

Function get_unique_name

dpdk/lib/table/rte_swx_table_wm.c:52–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50#endif
51
52static char *get_unique_name(void)
53{
54 uint64_t tsc = rte_get_tsc_cycles();
55 size_t size = sizeof(uint64_t) * 2 + 1;
56 char *name = calloc(1, size);
57
58 if (!name)
59 return NULL;
60
61 snprintf(name, size, "%016" PRIx64, tsc);
62 return name;
63}
64
65static uint32_t
66count_entries(struct rte_swx_table_entry_list *entries)

Callers 1

acl_table_createFunction · 0.85

Calls 3

callocFunction · 0.85
snprintfFunction · 0.85
rte_get_tsc_cyclesFunction · 0.50

Tested by

no test coverage detected