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

Function sfc_tx_queue_start

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

Source from the content-addressed store, hash-verified

1470}
1471
1472static int
1473sfc_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
1503fail_tx_qstart:
1504
1505fail_not_setup:
1506fail_not_started:
1507 sfc_adapter_unlock(sa);
1508 SFC_ASSERT(rc > 0);
1509 return -rc;
1510}
1511
1512static int
1513sfc_tx_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_tx_qstartFunction · 0.85

Tested by

no test coverage detected