-static void __attribute__((cold))
-fm10k_tx_queue_release_mbufs_vec(struct fm10k_tx_queue *txq)
-{
- unsigned i;
- const uint16_t max_desc = (uint16_t)(txq->nb_desc - 1);
-
- if (txq->sw_ring == NULL || txq->nb_free == max_desc)
- return;
-
- /* release the used mbufs in sw_ring */
- for (i = txq->next_dd - (txq->rs_thresh - 1);
- i != txq->next_free;
- i = (i + 1) & max_desc)
- rte_pktmbuf_free_seg(txq->sw_ring[i]);
-
- txq->nb_free = max_desc;
-
- /* reset tx_entry */
- for (i = 0; i < txq->nb_desc; i++)
- txq->sw_ring[i] = NULL;
-
- rte_free(txq->sw_ring);
- txq->sw_ring = NULL;
-}
-