- rte_eth_dev_stop(RXTX_PORT2);
-
- /* Test init same name pmd ring */
- rte_pmd_ring_init(name1, params_null);
- return 0;
-}
-
-static int
-test_pmd_ring_pair_create(void)
-{
- const char * name1 = "_RNG_P0";
- struct rte_eth_stats stats, stats2;
- struct rte_mbuf buf, *pbuf = &buf;
- struct rte_eth_conf null_conf;
-
- if (rte_eth_ring_pair_create(name1, SOCKET0) < 0) {
- printf("Create ring pair failed\n");
- return -1;
- }
-
- if ((RXTX_PORT4 >= RTE_MAX_ETHPORTS) || (RXTX_PORT5 >= RTE_MAX_ETHPORTS)) {
- printf(" TX/RX port exceed max eth ports\n");
- return -1;
- }
- if ((rte_eth_dev_configure(RXTX_PORT4, 1, 1, &null_conf) < 0)
- || (rte_eth_dev_configure(RXTX_PORT5, 1, 1, &null_conf) < 0)) {
- printf("Configure failed for RXTX port\n");
- return -1;
- }
-
- if ((rte_eth_tx_queue_setup(RXTX_PORT4, 0, RING_SIZE, SOCKET0, NULL) < 0)
- || (rte_eth_tx_queue_setup(RXTX_PORT5, 0, RING_SIZE, SOCKET0, NULL) < 0)) {
- printf("TX queue setup failed\n");
- return -1;
- }
-
- if ((rte_eth_rx_queue_setup(RXTX_PORT4, 0, RING_SIZE, SOCKET0, NULL, mp) < 0)
- || (rte_eth_rx_queue_setup(RXTX_PORT5, 0, RING_SIZE, SOCKET0, NULL, mp) < 0)) {
- printf("RX queue setup failed\n");
- return -1;
- }
-
- if ((rte_eth_dev_start(RXTX_PORT4) < 0)
- || (rte_eth_dev_start(RXTX_PORT5) < 0)) {
- printf("Error starting RXTX port\n");