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

Function sfc_tx_queue_setup

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

Source from the content-addressed store, hash-verified

541}
542
543static int
544sfc_tx_queue_setup(struct rte_eth_dev *dev, uint16_t ethdev_qid,
545 uint16_t nb_tx_desc, unsigned int socket_id,
546 const struct rte_eth_txconf *tx_conf)
547{
548 struct sfc_adapter_shared *sas = sfc_adapter_shared_by_eth_dev(dev);
549 struct sfc_adapter *sa = sfc_adapter_by_eth_dev(dev);
550 struct sfc_txq_info *txq_info;
551 sfc_sw_index_t sw_index;
552 int rc;
553
554 sfc_log_init(sa, "TxQ = %u, nb_tx_desc = %u, socket_id = %u",
555 ethdev_qid, nb_tx_desc, socket_id);
556
557 sfc_adapter_lock(sa);
558
559 sw_index = sfc_txq_sw_index_by_ethdev_tx_qid(sas, ethdev_qid);
560 rc = sfc_tx_qinit(sa, sw_index, nb_tx_desc, socket_id, tx_conf);
561 if (rc != 0)
562 goto fail_tx_qinit;
563
564 txq_info = sfc_txq_info_by_ethdev_qid(sas, ethdev_qid);
565 dev->data->tx_queues[ethdev_qid] = txq_info->dp;
566
567 sfc_adapter_unlock(sa);
568 return 0;
569
570fail_tx_qinit:
571 sfc_adapter_unlock(sa);
572 SFC_ASSERT(rc > 0);
573 return -rc;
574}
575
576static void
577sfc_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)

Callers

nothing calls this directly

Calls 5

sfc_adapter_by_eth_devFunction · 0.85
sfc_tx_qinitFunction · 0.85

Tested by

no test coverage detected