| 1470 | } |
| 1471 | |
| 1472 | static int |
| 1473 | sfc_tx_queue_start(struct rte_eth_dev *dev, uint16_t ethdev_qid) |
| 1474 | { |
| 1475 | struct sfc_adapter_shared *sas = sfc_adapter_shared_by_eth_dev(dev); |
| 1476 | struct sfc_adapter *sa = sfc_adapter_by_eth_dev(dev); |
| 1477 | struct sfc_txq_info *txq_info; |
| 1478 | sfc_sw_index_t sw_index; |
| 1479 | int rc; |
| 1480 | |
| 1481 | sfc_log_init(sa, "TxQ = %u", ethdev_qid); |
| 1482 | |
| 1483 | sfc_adapter_lock(sa); |
| 1484 | |
| 1485 | rc = EINVAL; |
| 1486 | if (sa->state != SFC_ETHDEV_STARTED) |
| 1487 | goto fail_not_started; |
| 1488 | |
| 1489 | txq_info = sfc_txq_info_by_ethdev_qid(sas, ethdev_qid); |
| 1490 | if (txq_info->state != SFC_TXQ_INITIALIZED) |
| 1491 | goto fail_not_setup; |
| 1492 | |
| 1493 | sw_index = sfc_txq_sw_index_by_ethdev_tx_qid(sas, ethdev_qid); |
| 1494 | rc = sfc_tx_qstart(sa, sw_index); |
| 1495 | if (rc != 0) |
| 1496 | goto fail_tx_qstart; |
| 1497 | |
| 1498 | txq_info->deferred_started = B_TRUE; |
| 1499 | |
| 1500 | sfc_adapter_unlock(sa); |
| 1501 | return 0; |
| 1502 | |
| 1503 | fail_tx_qstart: |
| 1504 | |
| 1505 | fail_not_setup: |
| 1506 | fail_not_started: |
| 1507 | sfc_adapter_unlock(sa); |
| 1508 | SFC_ASSERT(rc > 0); |
| 1509 | return -rc; |
| 1510 | } |
| 1511 | |
| 1512 | static int |
| 1513 | sfc_tx_queue_stop(struct rte_eth_dev *dev, uint16_t ethdev_qid) |
nothing calls this directly
no test coverage detected