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

Function rte_vhost_submit_enqueue_burst

dpdk/lib/vhost/virtio_net.c:2578–2604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2576}
2577
2578uint16_t
2579rte_vhost_submit_enqueue_burst(int vid, uint16_t queue_id,
2580 struct rte_mbuf **pkts, uint16_t count, int16_t dma_id,
2581 uint16_t vchan_id)
2582{
2583 struct virtio_net *dev = get_device(vid);
2584
2585 if (!dev)
2586 return 0;
2587
2588 if (unlikely(!(dev->flags & VIRTIO_DEV_BUILTIN_VIRTIO_NET))) {
2589 VHOST_LOG_DATA(dev->ifname, ERR,
2590 "%s: built-in vhost net backend is disabled.\n",
2591 __func__);
2592 return 0;
2593 }
2594
2595 if (unlikely(!is_valid_virt_queue_idx(queue_id, 0, dev->nr_vring))) {
2596 VHOST_LOG_DATA(dev->ifname, ERR,
2597 "%s: invalid virtqueue idx %d.\n",
2598 __func__, queue_id);
2599 return 0;
2600 }
2601
2602 return virtio_dev_rx_async_submit(dev, dev->virtqueue[queue_id], pkts, count,
2603 dma_id, vchan_id);
2604}
2605
2606static inline bool
2607virtio_net_with_host_offload(struct virtio_net *dev)

Callers 1

async_enqueue_pktsFunction · 0.85

Calls 3

get_deviceFunction · 0.85
is_valid_virt_queue_idxFunction · 0.85

Tested by

no test coverage detected