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

Function vring_translate

dpdk/lib/vhost/vhost.c:560–581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

558}
559
560int
561vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
562{
563
564 if (!(dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)))
565 return -1;
566
567 if (vq_is_packed(dev)) {
568 if (vring_translate_packed(dev, vq) < 0)
569 return -1;
570 } else {
571 if (vring_translate_split(dev, vq) < 0)
572 return -1;
573 }
574
575 if (log_translate(dev, vq) < 0)
576 return -1;
577
578 vq->access_ok = true;
579
580 return 0;
581}
582
583void
584vring_invalidate(struct virtio_net *dev __rte_unused, struct vhost_virtqueue *vq)

Callers 2

vduse_vring_setupFunction · 0.85

Calls 4

vq_is_packedFunction · 0.85
vring_translate_packedFunction · 0.85
vring_translate_splitFunction · 0.85
log_translateFunction · 0.85

Tested by

no test coverage detected