| 181 | } |
| 182 | |
| 183 | uint16_t |
| 184 | mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) |
| 185 | { |
| 186 | struct mana_txq *txq = dpdk_txq; |
| 187 | struct mana_priv *priv = txq->priv; |
| 188 | int ret; |
| 189 | void *db_page; |
| 190 | uint16_t pkt_sent = 0; |
| 191 | uint32_t num_comp, i; |
| 192 | #ifdef RTE_ARCH_32 |
| 193 | uint32_t wqe_count = 0; |
| 194 | #endif |
| 195 | |
| 196 | /* Process send completions from GDMA */ |
| 197 | num_comp = gdma_poll_completion_queue(&txq->gdma_cq, |
| 198 | txq->gdma_comp_buf, txq->num_desc); |
| 199 | |
| 200 | i = 0; |
| 201 | while (i < num_comp) { |
| 202 | struct mana_txq_desc *desc = |
| 203 | &txq->desc_ring[txq->desc_ring_tail]; |
| 204 | struct mana_tx_comp_oob *oob = (struct mana_tx_comp_oob *) |
| 205 | txq->gdma_comp_buf[i].cqe_data; |
| 206 | |
| 207 | if (oob->cqe_hdr.cqe_type != CQE_TX_OKAY) { |
| 208 | DP_LOG(ERR, |
| 209 | "mana_tx_comp_oob cqe_type %u vendor_err %u", |
| 210 | oob->cqe_hdr.cqe_type, oob->cqe_hdr.vendor_err); |
| 211 | txq->stats.errors++; |
| 212 | } else { |
| 213 | DP_LOG(DEBUG, "mana_tx_comp_oob CQE_TX_OKAY"); |
| 214 | txq->stats.packets++; |
| 215 | } |
| 216 | |
| 217 | if (!desc->pkt) { |
| 218 | DP_LOG(ERR, "mana_txq_desc has a NULL pkt"); |
| 219 | } else { |
| 220 | txq->stats.bytes += desc->pkt->pkt_len; |
| 221 | rte_pktmbuf_free(desc->pkt); |
| 222 | } |
| 223 | |
| 224 | desc->pkt = NULL; |
| 225 | txq->desc_ring_tail = (txq->desc_ring_tail + 1) % txq->num_desc; |
| 226 | txq->desc_ring_len--; |
| 227 | txq->gdma_sq.tail += desc->wqe_size_in_bu; |
| 228 | |
| 229 | /* If TX CQE suppression is used, don't read more CQE but move |
| 230 | * on to the next packet |
| 231 | */ |
| 232 | if (desc->suppress_tx_cqe) |
| 233 | continue; |
| 234 | |
| 235 | i++; |
| 236 | } |
| 237 | |
| 238 | /* Post send requests to GDMA */ |
| 239 | for (uint16_t pkt_idx = 0; pkt_idx < nb_pkts; pkt_idx++) { |
| 240 | struct rte_mbuf *m_pkt = tx_pkts[pkt_idx]; |
nothing calls this directly
no test coverage detected