| 1548 | } |
| 1549 | |
| 1550 | static void |
| 1551 | vhost_clear_queue(struct vhost_dev *vdev, uint16_t queue_id) |
| 1552 | { |
| 1553 | uint16_t n_pkt = 0; |
| 1554 | int pkts_inflight; |
| 1555 | |
| 1556 | int16_t dma_id = dma_bind[vid2socketid[vdev->vid]].dmas[queue_id].dev_id; |
| 1557 | pkts_inflight = rte_vhost_async_get_inflight(vdev->vid, queue_id); |
| 1558 | |
| 1559 | struct rte_mbuf *m_cpl[pkts_inflight]; |
| 1560 | |
| 1561 | while (pkts_inflight) { |
| 1562 | n_pkt = rte_vhost_clear_queue(vdev->vid, queue_id, m_cpl, |
| 1563 | pkts_inflight, dma_id, 0); |
| 1564 | free_pkts(m_cpl, n_pkt); |
| 1565 | pkts_inflight = rte_vhost_async_get_inflight(vdev->vid, queue_id); |
| 1566 | } |
| 1567 | } |
| 1568 | |
| 1569 | /* |
| 1570 | * Remove a device from the specific data core linked list and from the |
no test coverage detected