| 1372 | } |
| 1373 | |
| 1374 | void |
| 1375 | cpfl_stop_queues(struct rte_eth_dev *dev) |
| 1376 | { |
| 1377 | struct cpfl_vport *cpfl_vport = |
| 1378 | (struct cpfl_vport *)dev->data->dev_private; |
| 1379 | struct cpfl_rx_queue *cpfl_rxq; |
| 1380 | struct cpfl_tx_queue *cpfl_txq; |
| 1381 | int i; |
| 1382 | |
| 1383 | if (cpfl_vport->p2p_tx_complq != NULL) { |
| 1384 | if (cpfl_switch_hairpin_complq(cpfl_vport, false) != 0) |
| 1385 | PMD_DRV_LOG(ERR, "Failed to stop hairpin Tx complq"); |
| 1386 | } |
| 1387 | |
| 1388 | if (cpfl_vport->p2p_rx_bufq != NULL) { |
| 1389 | if (cpfl_switch_hairpin_bufq(cpfl_vport, false) != 0) |
| 1390 | PMD_DRV_LOG(ERR, "Failed to stop hairpin Rx bufq"); |
| 1391 | } |
| 1392 | |
| 1393 | for (i = 0; i < dev->data->nb_rx_queues; i++) { |
| 1394 | cpfl_rxq = dev->data->rx_queues[i]; |
| 1395 | if (cpfl_rxq == NULL) |
| 1396 | continue; |
| 1397 | |
| 1398 | if (cpfl_rx_queue_stop(dev, i) != 0) |
| 1399 | PMD_DRV_LOG(WARNING, "Fail to stop Rx queue %d", i); |
| 1400 | } |
| 1401 | |
| 1402 | for (i = 0; i < dev->data->nb_tx_queues; i++) { |
| 1403 | cpfl_txq = dev->data->tx_queues[i]; |
| 1404 | if (cpfl_txq == NULL) |
| 1405 | continue; |
| 1406 | |
| 1407 | if (cpfl_tx_queue_stop(dev, i) != 0) |
| 1408 | PMD_DRV_LOG(WARNING, "Fail to stop Tx queue %d", i); |
| 1409 | } |
| 1410 | } |
| 1411 | |
| 1412 | void |
| 1413 | cpfl_set_rx_function(struct rte_eth_dev *dev) |
no test coverage detected