MCPcopy Index your code
hub / github.com/F-Stack/f-stack / create_ring

Function create_ring

lib/ff_dpdk_if.c:398–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

396}
397
398static struct rte_ring *
399create_ring(const char *name, unsigned count, int socket_id, unsigned flags)
400{
401 struct rte_ring *ring;
402
403 if (name == NULL) {
404 rte_exit(EXIT_FAILURE, "create ring failed, no name!\n");
405 }
406
407 if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
408 ring = rte_ring_create(name, count, socket_id, flags);
409 } else {
410 ring = rte_ring_lookup(name);
411 }
412
413 if (ring == NULL) {
414 rte_exit(EXIT_FAILURE, "create ring:%s failed!\n", name);
415 }
416
417 return ring;
418}
419
420static int
421init_dispatch_ring(void)

Callers 2

init_dispatch_ringFunction · 0.70
init_msg_ringFunction · 0.70

Calls 4

rte_exitFunction · 0.85
rte_eal_process_typeFunction · 0.85
rte_ring_createFunction · 0.85
rte_ring_lookupFunction · 0.85

Tested by

no test coverage detected