| 541 | } |
| 542 | |
| 543 | static int |
| 544 | sfc_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 | |
| 570 | fail_tx_qinit: |
| 571 | sfc_adapter_unlock(sa); |
| 572 | SFC_ASSERT(rc > 0); |
| 573 | return -rc; |
| 574 | } |
| 575 | |
| 576 | static void |
| 577 | sfc_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid) |
nothing calls this directly
no test coverage detected