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

Function test_dev_start

dpdk/app/test/sample_packet_forward.c:21–45  ·  view source on GitHub ↗

* heper function: configure and start test device */

Source from the content-addressed store, hash-verified

19 * heper function: configure and start test device
20 */
21int
22test_dev_start(uint16_t port, struct rte_mempool *mp)
23{
24 int32_t rc;
25 struct rte_eth_conf pconf;
26
27 memset(&pconf, 0, sizeof(pconf));
28
29 rc = rte_eth_dev_configure(port, NUM_QUEUES, NUM_QUEUES, &pconf);
30 if (rc != 0)
31 return rc;
32
33 rc = rte_eth_rx_queue_setup(port, 0, RING_SIZE, SOCKET_ID_ANY,
34 NULL, mp);
35 if (rc != 0)
36 return rc;
37
38 rc = rte_eth_tx_queue_setup(port, 0, RING_SIZE, SOCKET_ID_ANY,
39 NULL);
40 if (rc != 0)
41 return rc;
42
43 rc = rte_eth_dev_start(port);
44 return rc;
45}
46
47/* Sample test to create virtual rings and tx,rx portid from rings */
48int

Callers 3

send_pktsFunction · 0.85
test_bit_packet_forwardFunction · 0.85

Calls 5

memsetFunction · 0.85
rte_eth_dev_configureFunction · 0.85
rte_eth_rx_queue_setupFunction · 0.85
rte_eth_tx_queue_setupFunction · 0.85
rte_eth_dev_startFunction · 0.85

Tested by

no test coverage detected