| 618 | } |
| 619 | |
| 620 | int bnxt_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id) |
| 621 | { |
| 622 | struct bnxt *bp = dev->data->dev_private; |
| 623 | struct bnxt_tx_queue *txq = bp->tx_queues[tx_queue_id]; |
| 624 | int rc = 0; |
| 625 | |
| 626 | rc = is_bnxt_in_error(bp); |
| 627 | if (rc) |
| 628 | return rc; |
| 629 | |
| 630 | /* reset the previous stats for the tx_queue since the counters |
| 631 | * will be cleared when the queue is started. |
| 632 | */ |
| 633 | memset(&bp->prev_tx_ring_stats[tx_queue_id], 0, |
| 634 | sizeof(struct bnxt_ring_stats)); |
| 635 | |
| 636 | bnxt_free_hwrm_tx_ring(bp, tx_queue_id); |
| 637 | rc = bnxt_alloc_hwrm_tx_ring(bp, tx_queue_id); |
| 638 | if (rc) |
| 639 | return rc; |
| 640 | |
| 641 | dev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED; |
| 642 | txq->tx_started = true; |
| 643 | PMD_DRV_LOG(DEBUG, "Tx queue started\n"); |
| 644 | |
| 645 | return 0; |
| 646 | } |
| 647 | |
| 648 | int bnxt_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) |
| 649 | { |
nothing calls this directly
no test coverage detected