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

Function cpfl_stop_queues

dpdk/drivers/net/cpfl/cpfl_rxtx.c:1374–1410  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1372}
1373
1374void
1375cpfl_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
1412void
1413cpfl_set_rx_function(struct rte_eth_dev *dev)

Callers 2

cpfl_dev_startFunction · 0.85
cpfl_dev_stopFunction · 0.85

Calls 4

cpfl_switch_hairpin_bufqFunction · 0.85
cpfl_rx_queue_stopFunction · 0.85
cpfl_tx_queue_stopFunction · 0.85

Tested by

no test coverage detected