* Post work requests for a Rx queue. */
| 121 | * Post work requests for a Rx queue. |
| 122 | */ |
| 123 | static int |
| 124 | mana_alloc_and_post_rx_wqes(struct mana_rxq *rxq) |
| 125 | { |
| 126 | int ret; |
| 127 | uint32_t i; |
| 128 | |
| 129 | #ifdef RTE_ARCH_32 |
| 130 | rxq->wqe_cnt_to_short_db = 0; |
| 131 | #endif |
| 132 | for (i = 0; i < rxq->num_desc; i++) { |
| 133 | ret = mana_alloc_and_post_rx_wqe(rxq); |
| 134 | if (ret) { |
| 135 | DP_LOG(ERR, "failed to post RX ret = %d", ret); |
| 136 | return ret; |
| 137 | } |
| 138 | |
| 139 | #ifdef RTE_ARCH_32 |
| 140 | if (rxq->wqe_cnt_to_short_db > RX_WQE_SHORT_DB_THRESHOLD) { |
| 141 | mana_rq_ring_doorbell(rxq); |
| 142 | rxq->wqe_cnt_to_short_db = 0; |
| 143 | } |
| 144 | #endif |
| 145 | } |
| 146 | |
| 147 | mana_rq_ring_doorbell(rxq); |
| 148 | |
| 149 | return ret; |
| 150 | } |
| 151 | |
| 152 | int |
| 153 | mana_stop_rx_queues(struct rte_eth_dev *dev) |
no test coverage detected