MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_vhost_enqueue_burst

Function rte_vhost_enqueue_burst

dpdk/lib/vhost/virtio_net.c:1753–1777  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1751}
1752
1753uint16_t
1754rte_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
1779static __rte_always_inline uint16_t
1780async_get_first_inflight_pkt_idx(struct vhost_virtqueue *vq)

Callers 3

eth_vhost_txFunction · 0.85
sync_virtio_xmitFunction · 0.85
sync_enqueue_pktsFunction · 0.85

Calls 3

get_deviceFunction · 0.85
is_valid_virt_queue_idxFunction · 0.85
virtio_dev_rxFunction · 0.85

Tested by

no test coverage detected