Sample test to create virtual rings and tx,rx portid from rings */
| 46 | |
| 47 | /* Sample test to create virtual rings and tx,rx portid from rings */ |
| 48 | int |
| 49 | test_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 */ |
| 65 | void |
no test coverage detected