/openbmc/linux/drivers/platform/mellanox/ |
H A D | mlxbf-tmfifo.c | 255 size = vring_size(vring->num, vring->align); in mlxbf_tmfifo_free_vrings() 257 vring->va, vring->dma); in mlxbf_tmfifo_free_vrings() 287 size = vring_size(vring->num, vring->align); in mlxbf_tmfifo_alloc_vrings() 329 const struct vring *vr = virtqueue_get_vring(vring->vq); in mlxbf_tmfifo_get_next_desc() 353 const struct vring *vr = virtqueue_get_vring(vring->vq); in mlxbf_tmfifo_release_desc() 724 vring->rem_len = vring->pkt_len; in mlxbf_tmfifo_rxtx_header() 725 fifo->vring[is_rx] = vring; in mlxbf_tmfifo_rxtx_header() 791 if (!IS_VRING_DROP(vring) && vring->rem_len > 0 && in mlxbf_tmfifo_rxtx_one_desc() 859 vring->fifo->vring[0] = NULL; in mlxbf_tmfifo_check_tx_timeout() 887 if (fifo->vring[is_rx] && fifo->vring[is_rx] != vring) in mlxbf_tmfifo_rxtx() [all …]
|
/openbmc/u-boot/drivers/virtio/ |
H A D | virtio_ring.c | 28 desc = vq->vring.desc; in virtqueue_add() 205 struct vring vring, in __vring_new_virtqueue() argument 220 vq->vring = vring; in __vring_new_virtqueue() 249 struct vring vring; in vring_create_virtqueue() local 308 ((char *)vq->vring.avail - (char *)vq->vring.desc); in virtqueue_get_avail_addr() 314 ((char *)vq->vring.used - (char *)vq->vring.desc); in virtqueue_get_used_addr() 330 vq->index, vq->vring.desc, vq->vring.num); in virtqueue_dump() 339 i, vq->vring.desc[i].addr, vq->vring.desc[i].len, in virtqueue_dump() 340 vq->vring.desc[i].flags, vq->vring.desc[i].next); in virtqueue_dump() 345 vq->vring.avail->flags, vq->vring.avail->idx); in virtqueue_dump() [all …]
|
/openbmc/linux/drivers/net/wireless/ath/wil6210/ |
H A D | txrx.c | 122 vring->ctx = kcalloc(vring->size, sizeof(vring->ctx[0]), GFP_KERNEL); in wil_vring_alloc() 166 vring->va, &vring->pa, vring->ctx); in wil_vring_alloc() 200 vring_index, vring->size, vring->va, in wil_vring_free() 201 &vring->pa, vring->ctx); in wil_vring_free() 204 vring->size, vring->va, in wil_vring_free() 205 &vring->pa, vring->ctx); in wil_vring_free() 216 &vring->va[vring->swtail].tx.legacy; in wil_vring_free() 218 ctx = &vring->ctx[vring->swtail]; in wil_vring_free() 234 &vring->va[vring->swhead].rx.legacy; in wil_vring_free() 236 ctx = &vring->ctx[vring->swhead]; in wil_vring_free() [all …]
|
H A D | trace.h | 212 TP_PROTO(u8 vring, u16 index, unsigned int len, u8 frags), 213 TP_ARGS(vring, index, len, frags), 215 __field(u8, vring) 221 __entry->vring = vring; 227 __entry->vring, __entry->index, __entry->len, __entry->frags) 231 TP_PROTO(u8 vring, u16 index, unsigned int len, u8 err), 232 TP_ARGS(vring, index, len, err), 234 __field(u8, vring) 240 __entry->vring = vring; 246 __entry->vring, __entry->index, __entry->len,
|
/openbmc/qemu/hw/virtio/ |
H A D | vhost-shadow-virtqueue.c | 145 vring_desc_t *descs = svq->vring.desc; in vhost_svq_vring_write_descs() 181 vring_avail_t *avail = svq->vring.avail; in vhost_svq_add_split() 231 uint16_t avail_event = *(uint16_t *)(&svq->vring.used->ring[svq->vring.num]); in vhost_svq_kick() 363 uint16_t *used_idx = &svq->vring.used->idx; in vhost_svq_more_used() 385 uint16_t *used_event = (uint16_t *)&svq->vring.avail->ring[svq->vring.num]; in vhost_svq_enable_notification() 420 const vring_used_t *used = svq->vring.used; in vhost_svq_get_buf() 435 if (unlikely(used_elem.id >= svq->vring.num)) { in vhost_svq_get_buf() 492 if (unlikely(i >= svq->vring.num)) { in vhost_svq_flush() 495 i, svq->vring.num); in vhost_svq_flush() 672 svq->num_free = svq->vring.num; in vhost_svq_start() [all …]
|
H A D | virtio.c | 122 VRing vring; member 239 addr = vq->vring.desc; in virtio_init_region_cache() 290 VRing *vring = &vdev->vq[n].vring; in virtio_queue_update_rings() local 292 if (!vring->num || !vring->desc || !vring->align) { in virtio_queue_update_rings() 296 vring->avail = vring->desc + vring->num * sizeof(VRingDesc); in virtio_queue_update_rings() 297 vring->used = vring_align(vring->avail + in virtio_queue_update_rings() 1701 max = vq->vring.num; in virtqueue_split_pop() 1845 max = vq->vring.num; in virtqueue_packed_pop() 2282 vdev->vq[i].vring.num = vdev->vq[i].vring.num_default; in __virtio_queue_reset() 2555 vq->vring.num = 0; in virtio_delete_queue() [all …]
|
H A D | vhost-shadow-virtqueue.h | 52 struct vring vring; member
|
/openbmc/linux/drivers/virtio/ |
H A D | virtio_ring.c | 91 struct vring vring; member 125 } vring; member 591 desc = vq->split.vring.desc; in virtqueue_add_split() 1024 num = vq->split.vring.num; in virtqueue_reinit_split() 1082 vring_split->vring.desc, in vring_free_split() 2750 if ((vq->packed_ring ? vq->packed.vring.num : vq->split.vring.num) == num) in virtqueue_resize() 2794 num = vq->packed_ring ? vq->packed.vring.num : vq->split.vring.num; in virtqueue_set_dma_premapped() 2901 vq->split.vring.desc, in vring_free() 2984 return vq->packed_ring ? vq->packed.vring.num : vq->split.vring.num; in virtqueue_get_vring_size() 3084 ((char *)vq->split.vring.avail - (char *)vq->split.vring.desc); in virtqueue_get_avail_addr() [all …]
|
/openbmc/linux/drivers/vdpa/ifcvf/ |
H A D | ifcvf_main.c | 32 struct vring_info *vring = arg; in ifcvf_vq_intr_handler() local 34 if (vring->cb.callback) in ifcvf_vq_intr_handler() 35 return vring->cb.callback(vring->cb.private); in ifcvf_vq_intr_handler() 43 struct vring_info *vring; in ifcvf_vqs_reused_intr_handler() local 47 vring = &vf->vring[i]; in ifcvf_vqs_reused_intr_handler() 48 if (vring->cb.callback) in ifcvf_vqs_reused_intr_handler() 49 vring->cb.callback(vring->cb.private); in ifcvf_vqs_reused_intr_handler() 79 devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); in ifcvf_free_per_vq_irq() 171 &vf->vring[i]); in ifcvf_request_per_vq_irq() 177 vf->vring[i].irq = irq; in ifcvf_request_per_vq_irq() [all …]
|
H A D | ifcvf_base.c | 168 hw->vring = kzalloc(sizeof(struct vring_info) * hw->nr_vring, GFP_KERNEL); in ifcvf_init_hw() 169 if (!hw->vring) in ifcvf_init_hw() 175 hw->vring[i].notify_addr = hw->notify_base + in ifcvf_init_hw() 177 hw->vring[i].notify_pa = hw->notify_base_pa + in ifcvf_init_hw() 179 hw->vring[i].irq = -EINVAL; in ifcvf_init_hw() 396 hw->vring[qid].cb.callback = NULL; in ifcvf_reset_vring() 397 hw->vring[qid].cb.private = NULL; in ifcvf_reset_vring() 431 vp_iowrite16(qid, hw->vring[qid].notify_addr); in ifcvf_notify_queue()
|
/openbmc/linux/drivers/vdpa/alibaba/ |
H A D | eni_vdpa.c | 41 struct eni_vring *vring; member 104 int irq = eni_vdpa->vring[idx].irq; in eni_vdpa_get_vq_irq() 122 &eni_vdpa->vring[i]); in eni_vdpa_free_irq() 141 struct eni_vring *vring = arg; in eni_vdpa_vq_handler() local 143 if (vring->cb.callback) in eni_vdpa_vq_handler() 144 return vring->cb.callback(vring->cb.private); in eni_vdpa_vq_handler() 184 &eni_vdpa->vring[i]); in eni_vdpa_request_irq() 190 eni_vdpa->vring[i].irq = irq; in eni_vdpa_request_irq() 286 eni_vdpa->vring[qid].cb = *cb; in eni_vdpa_set_vq_cb() 495 sizeof(*eni_vdpa->vring), in eni_vdpa_probe() [all …]
|
/openbmc/linux/drivers/vdpa/virtio_pci/ |
H A D | vp_vdpa.c | 37 struct vp_vring *vring; member 102 int irq = vp_vdpa->vring[idx].irq; in vp_vdpa_get_vq_irq() 120 &vp_vdpa->vring[i]); in vp_vdpa_free_irq() 139 struct vp_vring *vring = arg; in vp_vdpa_vq_handler() local 141 if (vring->cb.callback) in vp_vdpa_vq_handler() 142 return vring->cb.callback(vring->cb.private); in vp_vdpa_vq_handler() 182 &vp_vdpa->vring[i]); in vp_vdpa_request_irq() 189 vp_vdpa->vring[i].irq = irq; in vp_vdpa_request_irq() 305 vp_vdpa->vring[qid].cb = *cb; in vp_vdpa_set_vq_cb() 521 if (!vp_vdpa->vring) { in vp_vdpa_dev_add() [all …]
|
/openbmc/qemu/subprojects/libvduse/ |
H A D | libvduse.c | 97 VduseRing vring; member 456 if (*head >= vq->vring.num) { in vduse_queue_get_head() 586 memcpy(&vq->vring.used->ring[vq->vring.num], &val_le, sizeof(uint16_t)); in vring_set_avail_event() 878 if (!vq->vring.desc || !vq->vring.avail || !vq->vring.used) { in vduse_queue_update_vring() 960 vq->vring.num = 0; in vduse_queue_disable() 961 vq->vring.desc_addr = 0; in vduse_queue_disable() 962 vq->vring.avail_addr = 0; in vduse_queue_disable() 963 vq->vring.used_addr = 0; in vduse_queue_disable() 964 vq->vring.desc = 0; in vduse_queue_disable() 965 vq->vring.avail = 0; in vduse_queue_disable() [all …]
|
/openbmc/linux/drivers/vhost/ |
H A D | vringh.c | 49 &vrh->vring.avail->idx); in __vringh_get_head() 54 return vrh->vring.num; in __vringh_get_head() 68 if (head >= vrh->vring.num) { in __vringh_get_head() 70 head, vrh->vring.num); in __vringh_get_head() 251 *descs = vrh->vring.desc; in return_from_indirect() 311 descs = vrh->vring.desc; in __vringh_iov() 674 vrh->vring.num = num; in vringh_init_user() 712 *head = vrh->vring.num; in vringh_getdesc_user() 948 vrh->vring.num = num; in vringh_init_kern() 949 vrh->vring.desc = desc; in vringh_init_kern() [all …]
|
/openbmc/linux/tools/virtio/ |
H A D | vringh_test.c | 116 err = get_user(avail_idx, &vrh->vring.avail->idx); in vringh_get_head() 126 i = vrh->last_avail_idx & (vrh->vring.num - 1); in vringh_get_head() 128 err = get_user(*head, &vrh->vring.avail->ring[i]); in vringh_get_head() 190 vrh.vring.desc, vrh.vring.avail, vrh.vring.used); in parallel_test() 496 vrh.vring.desc, vrh.vring.avail, vrh.vring.used); in main() 652 assert(vrh.vring.used->idx % RINGSIZE != 0); in main() 667 struct vring vring; in main() local 690 assert(vring.desc[0].addr == (unsigned long)d); in main() 694 vring.desc[0].flags |= VRING_DESC_F_INDIRECT; in main() 695 vring.desc[1].flags |= VRING_DESC_F_INDIRECT; in main() [all …]
|
H A D | virtio_test.c | 34 struct vring vring; member 75 .desc_user_addr = (uint64_t)(unsigned long)info->vring.desc, in vhost_vq_setup() 76 .avail_user_addr = (uint64_t)(unsigned long)info->vring.avail, in vhost_vq_setup() 77 .used_user_addr = (uint64_t)(unsigned long)info->vring.used, in vhost_vq_setup() 82 state.num = info->vring.num; in vhost_vq_setup() 104 vring_init(&info->vring, num, info->ring, 4096); in vq_reset() 193 batch = (random() % vq->vring.num) + 1; in run_test() 236 vq_reset(vq, vq->vring.num, &dev->vdev); in run_test()
|
/openbmc/qemu/qapi/ |
H A D | virtio.json | 512 # @vring-num: VirtQueue vring.num 514 # @vring-num-default: VirtQueue vring.num_default 516 # @vring-align: VirtQueue vring.align 518 # @vring-desc: VirtQueue vring.desc (descriptor area) 520 # @vring-avail: VirtQueue vring.avail (driver area) 522 # @vring-used: VirtQueue vring.used (device area) 541 'vring-num': 'uint32', 543 'vring-align': 'uint32', 544 'vring-desc': 'uint64', 545 'vring-avail': 'uint64', [all …]
|
/openbmc/linux/drivers/vdpa/vdpa_sim/ |
H A D | vdpa_sim_net.c | 74 vringh_complete_iotlb(&vq->vring, vq->head, len); in vdpasim_net_complete() 80 if (vringh_need_notify_iotlb(&vq->vring) > 0) in vdpasim_net_complete() 81 vringh_notify(&vq->vring); in vdpasim_net_complete() 115 read = vringh_iov_pull_iotlb(&cvq->vring, &cvq->in_iov, in vdpasim_handle_ctrl_mac() 144 err = vringh_getdesc_iotlb(&cvq->vring, &cvq->in_iov, in vdpasim_handle_cvq() 174 write = vringh_iov_push_iotlb(&cvq->vring, &cvq->out_iov, in vdpasim_handle_cvq() 176 vringh_complete_iotlb(&cvq->vring, cvq->head, write); in vdpasim_handle_cvq() 220 err = vringh_getdesc_iotlb(&txq->vring, &txq->out_iov, NULL, in vdpasim_net_work() 229 read = vringh_iov_pull_iotlb(&txq->vring, &txq->out_iov, in vdpasim_net_work() 240 err = vringh_getdesc_iotlb(&rxq->vring, NULL, &rxq->in_iov, in vdpasim_net_work() [all …]
|
H A D | vdpa_sim_blk.c | 123 ret = vringh_getdesc_iotlb(&vq->vring, &vq->out_iov, &vq->in_iov, in vdpasim_blk_handle_req() 146 bytes = vringh_iov_pull_iotlb(&vq->vring, &vq->out_iov, &hdr, in vdpasim_blk_handle_req() 179 bytes = vringh_iov_push_iotlb(&vq->vring, &vq->in_iov, in vdpasim_blk_handle_req() 202 bytes = vringh_iov_pull_iotlb(&vq->vring, &vq->out_iov, in vdpasim_blk_handle_req() 215 bytes = vringh_iov_push_iotlb(&vq->vring, &vq->in_iov, in vdpasim_blk_handle_req() 245 bytes = vringh_iov_pull_iotlb(&vq->vring, &vq->out_iov, &range, in vdpasim_blk_handle_req() 307 bytes = vringh_iov_push_iotlb(&vq->vring, &vq->in_iov, &status, 1); in vdpasim_blk_handle_req() 319 vringh_complete_iotlb(&vq->vring, vq->head, pushed); in vdpasim_blk_handle_req() 349 if (vringh_need_notify_iotlb(&vq->vring) > 0) in vdpasim_blk_work() 350 vringh_notify(&vq->vring); in vdpasim_blk_work()
|
H A D | vdpa_sim.c | 82 static void vdpasim_vq_notify(struct vringh *vring) in vdpasim_vq_notify() argument 85 container_of(vring, struct vdpasim_virtqueue, vring); in vdpasim_vq_notify() 96 uint16_t last_avail_idx = vq->vring.last_avail_idx; in vdpasim_queue_ready() 108 vringh_init_iotlb(&vq->vring, vdpasim->features, vq->num, in vdpasim_queue_ready() 112 vq->vring.last_avail_idx = last_avail_idx; in vdpasim_queue_ready() 123 vq->vring.last_used_idx = last_avail_idx; in vdpasim_queue_ready() 124 vq->vring.notify = vdpasim_vq_notify; in vdpasim_queue_ready() 139 vq->vring.notify = NULL; in vdpasim_vq_reset() 361 struct vringh *vrh = &vq->vring; in vdpasim_set_vq_state() 375 struct vringh *vrh = &vq->vring; in vdpasim_get_vq_state() [all …]
|
/openbmc/u-boot/include/ |
H A D | virtio_ring.h | 77 struct vring { struct 104 struct vring vring; member 128 static inline void vring_init(struct vring *vr, unsigned int num, void *p, in vring_init()
|
/openbmc/qemu/subprojects/libvhost-user/ |
H A D | libvhost-user.c | 298 return !(vq->vring.desc && vq->vring.used && vq->vring.avail); in map_ring() 308 if (likely(vq->vring.avail)) { in vu_is_vq_usable() 351 vq->vring.desc = NULL; in unmap_rings() 352 vq->vring.used = NULL; in unmap_rings() 353 vq->vring.avail = NULL; in unmap_rings() 1224 vq->vring.flags = vra->flags; in vu_set_vring_addr_exec() 2382 if (*head >= vq->vring.num) { in virtqueue_get_head() 2472 max = vq->vring.num; in vu_queue_get_avail_bytes() 2477 desc = vq->vring.desc; in vu_queue_get_avail_bytes() 2705 memcpy(&vq->vring.used->ring[vq->vring.num], &val_le, sizeof(uint16_t)); in vring_set_avail_event() [all …]
|
/openbmc/linux/arch/arm/boot/dts/ti/keystone/ |
H A D | keystone-k2hk.dtsi | 167 interrupt-names = "vring", "exception"; 183 interrupt-names = "vring", "exception"; 199 interrupt-names = "vring", "exception"; 215 interrupt-names = "vring", "exception"; 231 interrupt-names = "vring", "exception"; 247 interrupt-names = "vring", "exception"; 263 interrupt-names = "vring", "exception"; 279 interrupt-names = "vring", "exception";
|
/openbmc/linux/drivers/remoteproc/ |
H A D | remoteproc_virtio.c | 119 if (id >= ARRAY_SIZE(rvdev->vring)) in rp_find_vq() 131 rvring = &rvdev->vring[id]; in rp_find_vq() 161 rsc->vring[id].da = mem->da; in rp_find_vq() 299 cfg = &rsc->vring[rsc->num_of_vrings]; in rproc_virtio_get() 317 cfg = &rsc->vring[rsc->num_of_vrings]; in rproc_virtio_set() 570 rproc_free_vring(&rvdev->vring[i]); in rproc_virtio_probe() 582 for (id = 0; id < ARRAY_SIZE(rvdev->vring); id++) { in rproc_virtio_remove() 583 rvring = &rvdev->vring[id]; in rproc_virtio_remove()
|
H A D | remoteproc_core.c | 349 size, rsc->vring[i].da, in rproc_alloc_vring() 381 rsc->vring[i].notifyid = notifyid; in rproc_alloc_vring() 390 struct fw_rsc_vdev_vring *vring = &rsc->vring[i]; in rproc_parse_vring() local 394 i, vring->da, vring->num, vring->align); in rproc_parse_vring() 397 if (!vring->num || !vring->align) { in rproc_parse_vring() 399 vring->num, vring->align); in rproc_parse_vring() 403 rvring->num = vring->num; in rproc_parse_vring() 404 rvring->align = vring->align; in rproc_parse_vring() 413 int idx = rvring - rvring->rvdev->vring; in rproc_free_vring() 431 rsc->vring[idx].da = 0; in rproc_free_vring() [all …]
|