| 1751 | } |
| 1752 | |
| 1753 | uint16_t |
| 1754 | rte_vhost_enqueue_burst(int vid, uint16_t queue_id, |
| 1755 | struct rte_mbuf **__rte_restrict pkts, uint16_t count) |
| 1756 | { |
| 1757 | struct virtio_net *dev = get_device(vid); |
| 1758 | |
| 1759 | if (!dev) |
| 1760 | return 0; |
| 1761 | |
| 1762 | if (unlikely(!(dev->flags & VIRTIO_DEV_BUILTIN_VIRTIO_NET))) { |
| 1763 | VHOST_LOG_DATA(dev->ifname, ERR, |
| 1764 | "%s: built-in vhost net backend is disabled.\n", |
| 1765 | __func__); |
| 1766 | return 0; |
| 1767 | } |
| 1768 | |
| 1769 | if (unlikely(!is_valid_virt_queue_idx(queue_id, 0, dev->nr_vring))) { |
| 1770 | VHOST_LOG_DATA(dev->ifname, ERR, |
| 1771 | "%s: invalid virtqueue idx %d.\n", |
| 1772 | __func__, queue_id); |
| 1773 | return 0; |
| 1774 | } |
| 1775 | |
| 1776 | return virtio_dev_rx(dev, dev->virtqueue[queue_id], pkts, count); |
| 1777 | } |
| 1778 | |
| 1779 | static __rte_always_inline uint16_t |
| 1780 | async_get_first_inflight_pkt_idx(struct vhost_virtqueue *vq) |
no test coverage detected