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

Function sfc_rx_queue_start

dpdk/drivers/net/sfc/sfc_ethdev.c:1407–1446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1405}
1406
1407static int
1408sfc_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
1440fail_rx_qstart:
1441fail_not_setup:
1442fail_not_started:
1443 sfc_adapter_unlock(sa);
1444 SFC_ASSERT(rc > 0);
1445 return -rc;
1446}
1447
1448static int
1449sfc_rx_queue_stop(struct rte_eth_dev *dev, uint16_t ethdev_qid)

Callers

nothing calls this directly

Calls 5

sfc_adapter_by_eth_devFunction · 0.85
sfc_rx_qstartFunction · 0.85

Tested by

no test coverage detected