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

Function test_ring_setup

dpdk/app/test/sample_packet_forward.c:48–62  ·  view source on GitHub ↗

Sample test to create virtual rings and tx,rx portid from rings */

Source from the content-addressed store, hash-verified

46
47/* Sample test to create virtual rings and tx,rx portid from rings */
48int
49test_ring_setup(struct rte_ring **ring, uint16_t *portid)
50{
51 *ring = rte_ring_create("R0", RING_SIZE, rte_socket_id(),
52 RING_F_SP_ENQ | RING_F_SC_DEQ);
53 if (*ring == NULL) {
54 printf("%s() line %u: rte_ring_create R0 failed",
55 __func__, __LINE__);
56 return -1;
57 }
58 *portid = rte_eth_from_rings("net_ringa", ring, NUM_QUEUES,
59 ring, NUM_QUEUES, rte_socket_id());
60
61 return 0;
62}
63
64/* Sample test to free the mempool */
65void

Callers 3

test_pdump_initFunction · 0.85
test_bit_ring_setupFunction · 0.85
test_latency_ring_setupFunction · 0.85

Calls 4

rte_ring_createFunction · 0.85
rte_socket_idFunction · 0.85
rte_eth_from_ringsFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected