| 1405 | } |
| 1406 | |
| 1407 | static int |
| 1408 | sfc_rx_queue_start(struct rte_eth_dev *dev, uint16_t ethdev_qid) |
| 1409 | { |
| 1410 | struct sfc_adapter_shared *sas = sfc_adapter_shared_by_eth_dev(dev); |
| 1411 | struct sfc_adapter *sa = sfc_adapter_by_eth_dev(dev); |
| 1412 | sfc_ethdev_qid_t sfc_ethdev_qid = ethdev_qid; |
| 1413 | struct sfc_rxq_info *rxq_info; |
| 1414 | sfc_sw_index_t sw_index; |
| 1415 | int rc; |
| 1416 | |
| 1417 | sfc_log_init(sa, "RxQ=%u", ethdev_qid); |
| 1418 | |
| 1419 | sfc_adapter_lock(sa); |
| 1420 | |
| 1421 | rc = EINVAL; |
| 1422 | if (sa->state != SFC_ETHDEV_STARTED) |
| 1423 | goto fail_not_started; |
| 1424 | |
| 1425 | rxq_info = sfc_rxq_info_by_ethdev_qid(sas, sfc_ethdev_qid); |
| 1426 | if (rxq_info->state != SFC_RXQ_INITIALIZED) |
| 1427 | goto fail_not_setup; |
| 1428 | |
| 1429 | sw_index = sfc_rxq_sw_index_by_ethdev_rx_qid(sas, sfc_ethdev_qid); |
| 1430 | rc = sfc_rx_qstart(sa, sw_index); |
| 1431 | if (rc != 0) |
| 1432 | goto fail_rx_qstart; |
| 1433 | |
| 1434 | rxq_info->deferred_started = B_TRUE; |
| 1435 | |
| 1436 | sfc_adapter_unlock(sa); |
| 1437 | |
| 1438 | return 0; |
| 1439 | |
| 1440 | fail_rx_qstart: |
| 1441 | fail_not_setup: |
| 1442 | fail_not_started: |
| 1443 | sfc_adapter_unlock(sa); |
| 1444 | SFC_ASSERT(rc > 0); |
| 1445 | return -rc; |
| 1446 | } |
| 1447 | |
| 1448 | static int |
| 1449 | sfc_rx_queue_stop(struct rte_eth_dev *dev, uint16_t ethdev_qid) |
nothing calls this directly
no test coverage detected