Lines Matching refs:dev
29 __vhost_iova_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq, in __vhost_iova_to_vva() argument
55 vhost_user_iotlb_pending_insert(dev, vq, iova, perm); in __vhost_iova_to_vva()
56 if (vhost_user_iotlb_miss(dev, iova, perm)) { in __vhost_iova_to_vva()
58 dev->ifname, iova); in __vhost_iova_to_vva()
94 __vhost_log_write(struct virtio_net *dev, uint64_t addr, uint64_t len) in __vhost_log_write() argument
98 if (unlikely(!dev->log_base || !len)) in __vhost_log_write()
101 if (unlikely(dev->log_size <= ((addr + len - 1) / VHOST_LOG_PAGE / 8))) in __vhost_log_write()
109 vhost_log_page((uint8_t *)(uintptr_t)dev->log_base, page); in __vhost_log_write()
115 __vhost_log_write_iova(struct virtio_net *dev, struct vhost_virtqueue *vq, in __vhost_log_write_iova() argument
121 hva = __vhost_iova_to_vva(dev, vq, iova, &map_len, VHOST_ACCESS_RW); in __vhost_log_write_iova()
125 dev->ifname, iova); in __vhost_log_write_iova()
129 gpa = hva_to_gpa(dev, hva, len); in __vhost_log_write_iova()
131 __vhost_log_write(dev, gpa, len); in __vhost_log_write_iova()
135 __vhost_log_cache_sync(struct virtio_net *dev, struct vhost_virtqueue *vq) in __vhost_log_cache_sync() argument
140 if (unlikely(!dev->log_base)) in __vhost_log_cache_sync()
149 log_base = (unsigned long *)(uintptr_t)dev->log_base; in __vhost_log_cache_sync()
172 vhost_log_cache_page(struct virtio_net *dev, struct vhost_virtqueue *vq, in vhost_log_cache_page() argument
182 vhost_log_page((uint8_t *)(uintptr_t)dev->log_base, page); in vhost_log_cache_page()
202 vhost_log_page((uint8_t *)(uintptr_t)dev->log_base, page); in vhost_log_cache_page()
213 __vhost_log_cache_write(struct virtio_net *dev, struct vhost_virtqueue *vq, in __vhost_log_cache_write() argument
218 if (unlikely(!dev->log_base || !len)) in __vhost_log_cache_write()
221 if (unlikely(dev->log_size <= ((addr + len - 1) / VHOST_LOG_PAGE / 8))) in __vhost_log_cache_write()
226 vhost_log_cache_page(dev, vq, page); in __vhost_log_cache_write()
232 __vhost_log_cache_write_iova(struct virtio_net *dev, struct vhost_virtqueue *vq, in __vhost_log_cache_write_iova() argument
238 hva = __vhost_iova_to_vva(dev, vq, iova, &map_len, VHOST_ACCESS_RW); in __vhost_log_cache_write_iova()
242 dev->ifname, iova); in __vhost_log_cache_write_iova()
246 gpa = hva_to_gpa(dev, hva, len); in __vhost_log_cache_write_iova()
248 __vhost_log_cache_write(dev, vq, gpa, len); in __vhost_log_cache_write_iova()
252 vhost_alloc_copy_ind_table(struct virtio_net *dev, struct vhost_virtqueue *vq, in vhost_alloc_copy_ind_table() argument
267 src = vhost_iova_to_vva(dev, vq, desc_addr, &len, in vhost_alloc_copy_ind_table()
294 cleanup_vq_inflight(struct virtio_net *dev, struct vhost_virtqueue *vq) in cleanup_vq_inflight() argument
296 if (!(dev->protocol_features & in cleanup_vq_inflight()
300 if (vq_is_packed(dev)) { in cleanup_vq_inflight()
323 cleanup_device(struct virtio_net *dev, int destroy) in cleanup_device() argument
327 vhost_backend_cleanup(dev); in cleanup_device()
329 for (i = 0; i < dev->nr_vring; i++) { in cleanup_device()
330 cleanup_vq(dev->virtqueue[i], destroy); in cleanup_device()
331 cleanup_vq_inflight(dev, dev->virtqueue[i]); in cleanup_device()
354 free_vq(struct virtio_net *dev, struct vhost_virtqueue *vq) in free_vq() argument
356 if (vq_is_packed(dev)) in free_vq()
372 free_device(struct virtio_net *dev) in free_device() argument
376 for (i = 0; i < dev->nr_vring; i++) in free_device()
377 free_vq(dev, dev->virtqueue[i]); in free_device()
379 rte_free(dev); in free_device()
383 log_translate(struct virtio_net *dev, struct vhost_virtqueue *vq) in log_translate() argument
388 vq->log_guest_addr = translate_log_addr(dev, vq, in log_translate()
404 translate_log_addr(struct virtio_net *dev, struct vhost_virtqueue *vq, in translate_log_addr() argument
407 if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) { in translate_log_addr()
412 hva = vhost_iova_to_vva(dev, vq, log_addr, in translate_log_addr()
418 gpa = hva_to_gpa(dev, hva, exp_size); in translate_log_addr()
423 dev->ifname, log_addr, hva); in translate_log_addr()
434 vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq) in vring_translate_split() argument
440 vq->desc = (struct vring_desc *)(uintptr_t)vhost_iova_to_vva(dev, vq, in vring_translate_split()
448 if (dev->features & (1ULL << VIRTIO_RING_F_EVENT_IDX)) in vring_translate_split()
451 vq->avail = (struct vring_avail *)(uintptr_t)vhost_iova_to_vva(dev, vq, in vring_translate_split()
459 if (dev->features & (1ULL << VIRTIO_RING_F_EVENT_IDX)) in vring_translate_split()
462 vq->used = (struct vring_used *)(uintptr_t)vhost_iova_to_vva(dev, vq, in vring_translate_split()
473 vring_translate_packed(struct virtio_net *dev, struct vhost_virtqueue *vq) in vring_translate_packed() argument
480 vhost_iova_to_vva(dev, vq, vq->ring_addrs.desc_user_addr, in vring_translate_packed()
488 vhost_iova_to_vva(dev, vq, vq->ring_addrs.avail_user_addr, in vring_translate_packed()
496 vhost_iova_to_vva(dev, vq, vq->ring_addrs.used_user_addr, in vring_translate_packed()
505 vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq) in vring_translate() argument
508 if (!(dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))) in vring_translate()
511 if (vq_is_packed(dev)) { in vring_translate()
512 if (vring_translate_packed(dev, vq) < 0) in vring_translate()
515 if (vring_translate_split(dev, vq) < 0) in vring_translate()
519 if (log_translate(dev, vq) < 0) in vring_translate()
528 vring_invalidate(struct virtio_net *dev, struct vhost_virtqueue *vq) in vring_invalidate() argument
530 if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) in vring_invalidate()
539 if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) in vring_invalidate()
544 init_vring_queue(struct virtio_net *dev, uint32_t vring_idx) in init_vring_queue() argument
551 dev->ifname, vring_idx); in init_vring_queue()
555 vq = dev->virtqueue[vring_idx]; in init_vring_queue()
558 dev->ifname, vring_idx); in init_vring_queue()
571 dev->ifname, rte_strerror(errno)); in init_vring_queue()
577 vhost_user_iotlb_init(dev, vring_idx); in init_vring_queue()
581 reset_vring_queue(struct virtio_net *dev, uint32_t vring_idx) in reset_vring_queue() argument
589 dev->ifname, vring_idx); in reset_vring_queue()
593 vq = dev->virtqueue[vring_idx]; in reset_vring_queue()
596 dev->ifname, vring_idx); in reset_vring_queue()
601 init_vring_queue(dev, vring_idx); in reset_vring_queue()
606 alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx) in alloc_vring_queue() argument
613 if (dev->virtqueue[i]) in alloc_vring_queue()
619 dev->ifname, i); in alloc_vring_queue()
623 dev->virtqueue[i] = vq; in alloc_vring_queue()
624 init_vring_queue(dev, i); in alloc_vring_queue()
631 dev->nr_vring = RTE_MAX(dev->nr_vring, vring_idx + 1); in alloc_vring_queue()
642 reset_device(struct virtio_net *dev) in reset_device() argument
646 dev->features = 0; in reset_device()
647 dev->protocol_features = 0; in reset_device()
648 dev->flags &= VIRTIO_DEV_BUILTIN_VIRTIO_NET; in reset_device()
650 for (i = 0; i < dev->nr_vring; i++) in reset_device()
651 reset_vring_queue(dev, i); in reset_device()
661 struct virtio_net *dev; in vhost_new_device() local
676 dev = rte_zmalloc(NULL, sizeof(struct virtio_net), 0); in vhost_new_device()
677 if (dev == NULL) { in vhost_new_device()
683 vhost_devices[i] = dev; in vhost_new_device()
686 dev->vid = i; in vhost_new_device()
687 dev->flags = VIRTIO_DEV_BUILTIN_VIRTIO_NET; in vhost_new_device()
688 dev->slave_req_fd = -1; in vhost_new_device()
689 dev->postcopy_ufd = -1; in vhost_new_device()
690 rte_spinlock_init(&dev->slave_req_lock); in vhost_new_device()
696 vhost_destroy_device_notify(struct virtio_net *dev) in vhost_destroy_device_notify() argument
700 if (dev->flags & VIRTIO_DEV_RUNNING) { in vhost_destroy_device_notify()
701 vdpa_dev = dev->vdpa_dev; in vhost_destroy_device_notify()
703 vdpa_dev->ops->dev_close(dev->vid); in vhost_destroy_device_notify()
704 dev->flags &= ~VIRTIO_DEV_RUNNING; in vhost_destroy_device_notify()
705 dev->notify_ops->destroy_device(dev->vid); in vhost_destroy_device_notify()
716 struct virtio_net *dev = get_device(vid); in vhost_destroy_device() local
718 if (dev == NULL) in vhost_destroy_device()
721 vhost_destroy_device_notify(dev); in vhost_destroy_device()
723 cleanup_device(dev, 1); in vhost_destroy_device()
724 free_device(dev); in vhost_destroy_device()
732 struct virtio_net *dev = get_device(vid); in vhost_attach_vdpa_device() local
734 if (dev == NULL) in vhost_attach_vdpa_device()
737 dev->vdpa_dev = vdpa_dev; in vhost_attach_vdpa_device()
743 struct virtio_net *dev; in vhost_set_ifname() local
746 dev = get_device(vid); in vhost_set_ifname()
747 if (dev == NULL) in vhost_set_ifname()
750 len = if_len > sizeof(dev->ifname) ? in vhost_set_ifname()
751 sizeof(dev->ifname) : if_len; in vhost_set_ifname()
753 strncpy(dev->ifname, if_name, len); in vhost_set_ifname()
754 dev->ifname[sizeof(dev->ifname) - 1] = '\0'; in vhost_set_ifname()
760 struct virtio_net *dev = get_device(vid); in vhost_setup_virtio_net() local
762 if (dev == NULL) in vhost_setup_virtio_net()
766 dev->flags |= VIRTIO_DEV_BUILTIN_VIRTIO_NET; in vhost_setup_virtio_net()
768 dev->flags &= ~VIRTIO_DEV_BUILTIN_VIRTIO_NET; in vhost_setup_virtio_net()
770 dev->flags |= VIRTIO_DEV_LEGACY_OL_FLAGS; in vhost_setup_virtio_net()
772 dev->flags &= ~VIRTIO_DEV_LEGACY_OL_FLAGS; in vhost_setup_virtio_net()
778 struct virtio_net *dev = get_device(vid); in vhost_enable_extbuf() local
780 if (dev == NULL) in vhost_enable_extbuf()
783 dev->extbuf = 1; in vhost_enable_extbuf()
789 struct virtio_net *dev = get_device(vid); in vhost_enable_linearbuf() local
791 if (dev == NULL) in vhost_enable_linearbuf()
794 dev->linearbuf = 1; in vhost_enable_linearbuf()
800 struct virtio_net *dev = get_device(vid); in rte_vhost_get_mtu() local
802 if (dev == NULL || mtu == NULL) in rte_vhost_get_mtu()
805 if (!(dev->flags & VIRTIO_DEV_READY)) in rte_vhost_get_mtu()
808 if (!(dev->features & (1ULL << VIRTIO_NET_F_MTU))) in rte_vhost_get_mtu()
811 *mtu = dev->mtu; in rte_vhost_get_mtu()
820 struct virtio_net *dev = get_device(vid); in rte_vhost_get_numa_node() local
824 if (dev == NULL || numa_available() != 0) in rte_vhost_get_numa_node()
827 ret = get_mempolicy(&numa_node, NULL, 0, dev, in rte_vhost_get_numa_node()
831 dev->ifname, rte_strerror(errno)); in rte_vhost_get_numa_node()
845 struct virtio_net *dev = get_device(vid); in rte_vhost_get_queue_num() local
847 if (dev == NULL) in rte_vhost_get_queue_num()
850 return dev->nr_vring / 2; in rte_vhost_get_queue_num()
856 struct virtio_net *dev = get_device(vid); in rte_vhost_get_vring_num() local
858 if (dev == NULL) in rte_vhost_get_vring_num()
861 return dev->nr_vring; in rte_vhost_get_vring_num()
867 struct virtio_net *dev = get_device(vid); in rte_vhost_get_ifname() local
869 if (dev == NULL || buf == NULL) in rte_vhost_get_ifname()
872 len = RTE_MIN(len, sizeof(dev->ifname)); in rte_vhost_get_ifname()
874 strncpy(buf, dev->ifname, len); in rte_vhost_get_ifname()
883 struct virtio_net *dev; in rte_vhost_get_negotiated_features() local
885 dev = get_device(vid); in rte_vhost_get_negotiated_features()
886 if (dev == NULL || features == NULL) in rte_vhost_get_negotiated_features()
889 *features = dev->features; in rte_vhost_get_negotiated_features()
897 struct virtio_net *dev; in rte_vhost_get_negotiated_protocol_features() local
899 dev = get_device(vid); in rte_vhost_get_negotiated_protocol_features()
900 if (dev == NULL || protocol_features == NULL) in rte_vhost_get_negotiated_protocol_features()
903 *protocol_features = dev->protocol_features; in rte_vhost_get_negotiated_protocol_features()
910 struct virtio_net *dev; in rte_vhost_get_mem_table() local
914 dev = get_device(vid); in rte_vhost_get_mem_table()
915 if (dev == NULL || mem == NULL) in rte_vhost_get_mem_table()
918 size = dev->mem->nregions * sizeof(struct rte_vhost_mem_region); in rte_vhost_get_mem_table()
923 m->nregions = dev->mem->nregions; in rte_vhost_get_mem_table()
924 memcpy(m->regions, dev->mem->regions, size); in rte_vhost_get_mem_table()
934 struct virtio_net *dev; in rte_vhost_get_vhost_vring() local
937 dev = get_device(vid); in rte_vhost_get_vhost_vring()
938 if (dev == NULL || vring == NULL) in rte_vhost_get_vhost_vring()
944 vq = dev->virtqueue[vring_idx]; in rte_vhost_get_vhost_vring()
948 if (vq_is_packed(dev)) { in rte_vhost_get_vhost_vring()
970 struct virtio_net *dev; in rte_vhost_get_vhost_ring_inflight() local
973 dev = get_device(vid); in rte_vhost_get_vhost_ring_inflight()
974 if (unlikely(!dev)) in rte_vhost_get_vhost_ring_inflight()
980 vq = dev->virtqueue[vring_idx]; in rte_vhost_get_vhost_ring_inflight()
984 if (vq_is_packed(dev)) { in rte_vhost_get_vhost_ring_inflight()
1006 struct virtio_net *dev; in rte_vhost_set_inflight_desc_split() local
1008 dev = get_device(vid); in rte_vhost_set_inflight_desc_split()
1009 if (unlikely(!dev)) in rte_vhost_set_inflight_desc_split()
1012 if (unlikely(!(dev->protocol_features & in rte_vhost_set_inflight_desc_split()
1016 if (unlikely(vq_is_packed(dev))) in rte_vhost_set_inflight_desc_split()
1022 vq = dev->virtqueue[vring_idx]; in rte_vhost_set_inflight_desc_split()
1043 struct virtio_net *dev; in rte_vhost_set_inflight_desc_packed() local
1048 dev = get_device(vid); in rte_vhost_set_inflight_desc_packed()
1049 if (unlikely(!dev)) in rte_vhost_set_inflight_desc_packed()
1052 if (unlikely(!(dev->protocol_features & in rte_vhost_set_inflight_desc_packed()
1056 if (unlikely(!vq_is_packed(dev))) in rte_vhost_set_inflight_desc_packed()
1062 vq = dev->virtqueue[vring_idx]; in rte_vhost_set_inflight_desc_packed()
1109 struct virtio_net *dev; in rte_vhost_clr_inflight_desc_split() local
1112 dev = get_device(vid); in rte_vhost_clr_inflight_desc_split()
1113 if (unlikely(!dev)) in rte_vhost_clr_inflight_desc_split()
1116 if (unlikely(!(dev->protocol_features & in rte_vhost_clr_inflight_desc_split()
1120 if (unlikely(vq_is_packed(dev))) in rte_vhost_clr_inflight_desc_split()
1126 vq = dev->virtqueue[vring_idx]; in rte_vhost_clr_inflight_desc_split()
1151 struct virtio_net *dev; in rte_vhost_clr_inflight_desc_packed() local
1154 dev = get_device(vid); in rte_vhost_clr_inflight_desc_packed()
1155 if (unlikely(!dev)) in rte_vhost_clr_inflight_desc_packed()
1158 if (unlikely(!(dev->protocol_features & in rte_vhost_clr_inflight_desc_packed()
1162 if (unlikely(!vq_is_packed(dev))) in rte_vhost_clr_inflight_desc_packed()
1168 vq = dev->virtqueue[vring_idx]; in rte_vhost_clr_inflight_desc_packed()
1196 struct virtio_net *dev; in rte_vhost_set_last_inflight_io_split() local
1199 dev = get_device(vid); in rte_vhost_set_last_inflight_io_split()
1200 if (unlikely(!dev)) in rte_vhost_set_last_inflight_io_split()
1203 if (unlikely(!(dev->protocol_features & in rte_vhost_set_last_inflight_io_split()
1207 if (unlikely(vq_is_packed(dev))) in rte_vhost_set_last_inflight_io_split()
1213 vq = dev->virtqueue[vring_idx]; in rte_vhost_set_last_inflight_io_split()
1232 struct virtio_net *dev; in rte_vhost_set_last_inflight_io_packed() local
1236 dev = get_device(vid); in rte_vhost_set_last_inflight_io_packed()
1237 if (unlikely(!dev)) in rte_vhost_set_last_inflight_io_packed()
1240 if (unlikely(!(dev->protocol_features & in rte_vhost_set_last_inflight_io_packed()
1244 if (unlikely(!vq_is_packed(dev))) in rte_vhost_set_last_inflight_io_packed()
1250 vq = dev->virtqueue[vring_idx]; in rte_vhost_set_last_inflight_io_packed()
1280 struct virtio_net *dev; in rte_vhost_vring_call() local
1283 dev = get_device(vid); in rte_vhost_vring_call()
1284 if (!dev) in rte_vhost_vring_call()
1290 vq = dev->virtqueue[vring_idx]; in rte_vhost_vring_call()
1296 if (vq_is_packed(dev)) in rte_vhost_vring_call()
1297 vhost_vring_call_packed(dev, vq); in rte_vhost_vring_call()
1299 vhost_vring_call_split(dev, vq); in rte_vhost_vring_call()
1309 struct virtio_net *dev; in rte_vhost_avail_entries() local
1313 dev = get_device(vid); in rte_vhost_avail_entries()
1314 if (!dev) in rte_vhost_avail_entries()
1320 vq = dev->virtqueue[queue_id]; in rte_vhost_avail_entries()
1337 vhost_enable_notify_split(struct virtio_net *dev, in vhost_enable_notify_split() argument
1343 if (!(dev->features & (1ULL << VIRTIO_RING_F_EVENT_IDX))) { in vhost_enable_notify_split()
1356 vhost_enable_notify_packed(struct virtio_net *dev, in vhost_enable_notify_packed() argument
1370 if (dev->features & (1ULL << VIRTIO_RING_F_EVENT_IDX)) { in vhost_enable_notify_packed()
1383 vhost_enable_guest_notification(struct virtio_net *dev, in vhost_enable_guest_notification() argument
1393 if (vq_is_packed(dev)) in vhost_enable_guest_notification()
1394 return vhost_enable_notify_packed(dev, vq, enable); in vhost_enable_guest_notification()
1396 return vhost_enable_notify_split(dev, vq, enable); in vhost_enable_guest_notification()
1402 struct virtio_net *dev = get_device(vid); in rte_vhost_enable_guest_notification() local
1406 if (!dev) in rte_vhost_enable_guest_notification()
1412 vq = dev->virtqueue[queue_id]; in rte_vhost_enable_guest_notification()
1419 ret = vhost_enable_guest_notification(dev, vq, enable); in rte_vhost_enable_guest_notification()
1429 struct virtio_net *dev = get_device(vid); in rte_vhost_log_write() local
1431 if (dev == NULL) in rte_vhost_log_write()
1434 vhost_log_write(dev, addr, len); in rte_vhost_log_write()
1441 struct virtio_net *dev; in rte_vhost_log_used_vring() local
1444 dev = get_device(vid); in rte_vhost_log_used_vring()
1445 if (dev == NULL) in rte_vhost_log_used_vring()
1450 vq = dev->virtqueue[vring_idx]; in rte_vhost_log_used_vring()
1454 vhost_log_used_vring(dev, vq, offset, len); in rte_vhost_log_used_vring()
1460 struct virtio_net *dev; in rte_vhost_rx_queue_count() local
1464 dev = get_device(vid); in rte_vhost_rx_queue_count()
1465 if (dev == NULL) in rte_vhost_rx_queue_count()
1468 if (unlikely(qid >= dev->nr_vring || (qid & 1) == 0)) { in rte_vhost_rx_queue_count()
1470 dev->ifname, __func__, qid); in rte_vhost_rx_queue_count()
1474 vq = dev->virtqueue[qid]; in rte_vhost_rx_queue_count()
1493 struct virtio_net *dev = get_device(vid); in rte_vhost_get_vdpa_device() local
1495 if (dev == NULL) in rte_vhost_get_vdpa_device()
1498 return dev->vdpa_dev; in rte_vhost_get_vdpa_device()
1505 struct virtio_net *dev = get_device(vid); in rte_vhost_get_log_base() local
1507 if (dev == NULL || log_base == NULL || log_size == NULL) in rte_vhost_get_log_base()
1510 *log_base = dev->log_base; in rte_vhost_get_log_base()
1511 *log_size = dev->log_size; in rte_vhost_get_log_base()
1521 struct virtio_net *dev = get_device(vid); in rte_vhost_get_vring_base() local
1523 if (dev == NULL || last_avail_idx == NULL || last_used_idx == NULL) in rte_vhost_get_vring_base()
1529 vq = dev->virtqueue[queue_id]; in rte_vhost_get_vring_base()
1533 if (vq_is_packed(dev)) { in rte_vhost_get_vring_base()
1551 struct virtio_net *dev = get_device(vid); in rte_vhost_set_vring_base() local
1553 if (!dev) in rte_vhost_set_vring_base()
1559 vq = dev->virtqueue[queue_id]; in rte_vhost_set_vring_base()
1563 if (vq_is_packed(dev)) { in rte_vhost_set_vring_base()
1584 struct virtio_net *dev = get_device(vid); in rte_vhost_get_vring_base_from_inflight() local
1586 if (dev == NULL || last_avail_idx == NULL || last_used_idx == NULL) in rte_vhost_get_vring_base_from_inflight()
1592 vq = dev->virtqueue[queue_id]; in rte_vhost_get_vring_base_from_inflight()
1596 if (!vq_is_packed(dev)) in rte_vhost_get_vring_base_from_inflight()
1614 struct virtio_net *dev = get_device(vid); in rte_vhost_extern_callback_register() local
1616 if (dev == NULL || ops == NULL) in rte_vhost_extern_callback_register()
1619 dev->extern_ops = *ops; in rte_vhost_extern_callback_register()
1620 dev->extern_data = ctx; in rte_vhost_extern_callback_register()
1627 struct virtio_net *dev = get_device(vid); in async_channel_register() local
1628 struct vhost_virtqueue *vq = dev->virtqueue[queue_id]; in async_channel_register()
1635 dev->ifname, queue_id); in async_channel_register()
1642 dev->ifname, queue_id); in async_channel_register()
1650 dev->ifname, queue_id); in async_channel_register()
1658 dev->ifname, queue_id); in async_channel_register()
1662 if (vq_is_packed(dev)) { in async_channel_register()
1668 dev->ifname, queue_id); in async_channel_register()
1677 dev->ifname, queue_id); in async_channel_register()
1697 struct virtio_net *dev = get_device(vid); in rte_vhost_async_channel_register() local
1700 if (dev == NULL) in rte_vhost_async_channel_register()
1706 vq = dev->virtqueue[queue_id]; in rte_vhost_async_channel_register()
1708 if (unlikely(vq == NULL || !dev->async_copy)) in rte_vhost_async_channel_register()
1722 struct virtio_net *dev = get_device(vid); in rte_vhost_async_channel_register_thread_unsafe() local
1724 if (dev == NULL) in rte_vhost_async_channel_register_thread_unsafe()
1730 vq = dev->virtqueue[queue_id]; in rte_vhost_async_channel_register_thread_unsafe()
1732 if (unlikely(vq == NULL || !dev->async_copy)) in rte_vhost_async_channel_register_thread_unsafe()
1742 struct virtio_net *dev = get_device(vid); in rte_vhost_async_channel_unregister() local
1745 if (dev == NULL) in rte_vhost_async_channel_unregister()
1751 vq = dev->virtqueue[queue_id]; in rte_vhost_async_channel_unregister()
1763 dev->ifname); in rte_vhost_async_channel_unregister()
1768 VHOST_LOG_CONFIG(ERR, "(%s) failed to unregister async channel.\n", dev->ifname); in rte_vhost_async_channel_unregister()
1770 dev->ifname); in rte_vhost_async_channel_unregister()
1786 struct virtio_net *dev = get_device(vid); in rte_vhost_async_channel_unregister_thread_unsafe() local
1788 if (dev == NULL) in rte_vhost_async_channel_unregister_thread_unsafe()
1794 vq = dev->virtqueue[queue_id]; in rte_vhost_async_channel_unregister_thread_unsafe()
1803 VHOST_LOG_CONFIG(ERR, "(%s) failed to unregister async channel.\n", dev->ifname); in rte_vhost_async_channel_unregister_thread_unsafe()
1805 dev->ifname); in rte_vhost_async_channel_unregister_thread_unsafe()
1880 struct virtio_net *dev = get_device(vid); in rte_vhost_async_get_inflight() local
1883 if (dev == NULL) in rte_vhost_async_get_inflight()
1889 vq = dev->virtqueue[queue_id]; in rte_vhost_async_get_inflight()
1900 dev->ifname); in rte_vhost_async_get_inflight()
1914 struct virtio_net *dev = get_device(vid); in rte_vhost_async_get_inflight_thread_unsafe() local
1917 if (dev == NULL) in rte_vhost_async_get_inflight_thread_unsafe()
1923 vq = dev->virtqueue[queue_id]; in rte_vhost_async_get_inflight_thread_unsafe()
1940 struct virtio_net *dev = get_device(vid); in rte_vhost_get_monitor_addr() local
1943 if (dev == NULL) in rte_vhost_get_monitor_addr()
1948 vq = dev->virtqueue[queue_id]; in rte_vhost_get_monitor_addr()
1952 if (vq_is_packed(dev)) { in rte_vhost_get_monitor_addr()