Home
last modified time | relevance | path

Searched refs:vqs (Results 1 – 25 of 45) sorted by relevance

12

/linux/drivers/vdpa/solidrun/
H A Dsnet_main.c77 if (snet->vqs[i] && snet->vqs[i]->irq != -1) { in snet_free_irqs()
78 devm_free_irq(&pdev->dev, snet->vqs[i]->irq, snet->vqs[i]); in snet_free_irqs()
79 snet->vqs[i]->irq = -1; in snet_free_irqs()
91 snet->vqs[idx]->desc_area = desc_area; in snet_set_vq_address()
92 snet->vqs[idx]->driver_area = driver_area; in snet_set_vq_address()
93 snet->vqs[idx]->device_area = device_area; in snet_set_vq_address()
102 snet->vqs[idx]->num = num; in snet_set_vq_num()
109 if (unlikely(!snet->vqs[idx]->ready)) in snet_kick_vq()
112 iowrite32(SNET_KICK_VAL, snet->vqs[idx]->kick_ptr); in snet_kick_vq()
121 if (unlikely(!snet->vqs[idx]->ready)) in snet_kick_vq_with_data()
[all …]
/linux/drivers/vdpa/pds/
H A Dvdpa_dev.c77 pdsv->vqs[qid].desc_addr = desc_addr; in pds_vdpa_set_vq_address()
78 pdsv->vqs[qid].avail_addr = driver_addr; in pds_vdpa_set_vq_address()
79 pdsv->vqs[qid].used_addr = device_addr; in pds_vdpa_set_vq_address()
88 pdsv->vqs[qid].q_len = num; in pds_vdpa_set_vq_num()
95 iowrite16(qid, pdsv->vqs[qid].notify); in pds_vdpa_kick_vq()
103 pdsv->vqs[qid].event_cb = *cb; in pds_vdpa_set_vq_cb()
119 if (pdsv->vqs[qid].irq == VIRTIO_MSI_NO_VECTOR) in pds_vdpa_release_irq()
122 free_irq(pdsv->vqs[qid].irq, &pdsv->vqs[qid]); in pds_vdpa_release_irq()
123 pdsv->vqs[qid].irq = VIRTIO_MSI_NO_VECTOR; in pds_vdpa_release_irq()
135 __func__, qid, pdsv->vqs[qid].ready, ready); in pds_vdpa_set_vq_ready()
[all …]
/linux/drivers/vhost/
H A Dtest.c44 struct vhost_virtqueue vqs[VHOST_TEST_VQ_MAX]; member
51 struct vhost_virtqueue *vq = &n->vqs[VHOST_TEST_VQ]; in handle_vq()
115 struct vhost_virtqueue **vqs; in vhost_test_open() local
119 vqs = kmalloc_objs(*vqs, VHOST_TEST_VQ_MAX); in vhost_test_open()
120 if (!vqs) { in vhost_test_open()
126 vqs[VHOST_TEST_VQ] = &n->vqs[VHOST_TEST_VQ]; in vhost_test_open()
127 n->vqs[VHOST_TEST_VQ].handle_kick = handle_vq_kick; in vhost_test_open()
128 vhost_dev_init(dev, vqs, VHOST_TEST_VQ_MAX, UIO_MAXIOV, in vhost_test_open()
150 *privatep = vhost_test_stop_vq(n, n->vqs + VHOST_TEST_VQ); in vhost_test_stop()
167 kfree(n->dev.vqs); in vhost_test_release()
[all …]
H A Dnet.c138 struct vhost_net_virtqueue vqs[VHOST_NET_VQ_MAX]; member
290 kfree(n->vqs[i].ubuf_info); in vhost_net_clear_ubuf_info()
291 n->vqs[i].ubuf_info = NULL; in vhost_net_clear_ubuf_info()
304 n->vqs[i].ubuf_info = in vhost_net_set_ubuf_info()
305 kmalloc_objs(*n->vqs[i].ubuf_info, UIO_MAXIOV); in vhost_net_set_ubuf_info()
306 if (!n->vqs[i].ubuf_info) in vhost_net_set_ubuf_info()
323 n->vqs[i].done_idx = 0; in vhost_net_vq_reset()
324 n->vqs[i].upend_idx = 0; in vhost_net_vq_reset()
325 n->vqs[i].ubufs = NULL; in vhost_net_vq_reset()
326 n->vqs[i].vhost_hlen = 0; in vhost_net_vq_reset()
[all …]
H A Dscsi.c245 struct vhost_scsi_virtqueue *vqs; member
313 vq = &vs->vqs[i].vq; in vhost_scsi_init_inflight()
318 idx = vs->vqs[i].inflight_idx; in vhost_scsi_init_inflight()
320 old_inflight[i] = &vs->vqs[i].inflights[idx]; in vhost_scsi_init_inflight()
323 vs->vqs[i].inflight_idx = idx ^ 1; in vhost_scsi_init_inflight()
324 new_inflight = &vs->vqs[i].inflights[idx ^ 1]; in vhost_scsi_init_inflight()
542 struct vhost_virtqueue *vq = &vs->vqs[VHOST_SCSI_VQ_EVT].vq; in vhost_scsi_allocate_evt()
572 struct vhost_virtqueue *vq = &vs->vqs[VHOST_SCSI_VQ_EVT].vq; in vhost_scsi_do_evt_work()
635 struct vhost_virtqueue *vq = &vs->vqs[VHOST_SCSI_VQ_EVT].vq; in vhost_scsi_complete_events()
2005 if (!vhost_vq_access_ok(&vs->vqs[index].vq)) { in vhost_scsi_set_endpoint()
[all …]
H A Dvhost.c352 __vhost_vq_meta_reset(d->vqs[i]); in vhost_vq_meta_reset()
474 vq = dev->vqs[i]; in vhost_worker_killed()
516 vq = dev->vqs[i]; in vhost_dev_alloc_iovecs()
529 vhost_vq_free_iovecs(dev->vqs[i]); in vhost_dev_alloc_iovecs()
538 vhost_vq_free_iovecs(dev->vqs[i]); in vhost_dev_free_iovecs()
581 struct vhost_virtqueue **vqs, int nvqs, in vhost_dev_init() argument
590 dev->vqs = vqs; in vhost_dev_init()
610 vq = dev->vqs[i]; in vhost_dev_init()
731 rcu_assign_pointer(dev->vqs[i]->worker, NULL); in vhost_workers_free()
1003 *vq = dev->vqs[idx]; in vhost_get_vq_from_user()
[all …]
H A Dvdpa.c53 struct vhost_virtqueue *vqs; member
180 ops->kick_vq(v->vdpa, vq - v->vqs); in handle_vq_kick()
207 struct vhost_virtqueue *vq = &v->vqs[qid]; in vhost_vdpa_setup_vq_irq()
231 struct vhost_virtqueue *vq = &v->vqs[qid]; in vhost_vdpa_unsetup_vq_irq()
243 if (v->vdev.vqs) { in _compat_vdpa_reset()
244 flags |= !vhost_backend_has_feature(v->vdev.vqs[0], in _compat_vdpa_reset()
495 struct vhost_virtqueue *vq = d->vqs[i]; in vhost_vdpa_set_features()
659 vq = &v->vqs[idx]; in vhost_vdpa_vring_ioctl()
1414 kfree(v->vdev.vqs); in vhost_vdpa_cleanup()
1415 v->vdev.vqs = NULL; in vhost_vdpa_cleanup()
[all …]
/linux/drivers/virtio/
H A Dvirtio_pci_common.c271 list_for_each_entry_safe(vq, n, &vdev->vqs, list) { in vp_del_vqs()
273 vp_dev->vqs[vq->index]; in vp_del_vqs()
316 kfree(vp_dev->vqs); in vp_del_vqs()
317 vp_dev->vqs = NULL; in vp_del_vqs()
374 struct virtqueue *vqs[], in vp_find_vqs_msix() argument
387 vp_dev->vqs = kzalloc_objs(*vp_dev->vqs, nvqs); in vp_find_vqs_msix()
388 if (!vp_dev->vqs) in vp_find_vqs_msix()
423 vqs[i] = NULL; in vp_find_vqs_msix()
426 vqs[i] = vp_find_one_vq_msix(vdev, queue_idx, vqi->callback, in vp_find_vqs_msix()
429 &vp_dev->vqs[queue_idx]); in vp_find_vqs_msix()
[all …]
H A Dvirtio_rtc_driver.c56 struct viortc_vq vqs[VIORTC_MAX_NR_QUEUES]; member
240 viortc_vq = &viortc->vqs[vq->index]; in viortc_do_cb()
602 ret = viortc_msg_xfer(&viortc->vqs[VIORTC_REQUESTQ], VIORTC_MSG(hdl), in viortc_read()
644 ret = viortc_msg_xfer(&viortc->vqs[VIORTC_REQUESTQ], VIORTC_MSG(hdl), in viortc_read_cross()
684 ret = viortc_msg_xfer(&viortc->vqs[VIORTC_REQUESTQ], VIORTC_MSG(hdl), in viortc_cfg()
725 ret = viortc_msg_xfer(&viortc->vqs[VIORTC_REQUESTQ], VIORTC_MSG(hdl), in viortc_clock_cap()
769 ret = viortc_msg_xfer(&viortc->vqs[VIORTC_REQUESTQ], VIORTC_MSG(hdl), in viortc_cross_cap()
811 ret = viortc_msg_xfer(&viortc->vqs[VIORTC_REQUESTQ], VIORTC_MSG(hdl), in viortc_read_alarm()
860 ret = viortc_msg_xfer(&viortc->vqs[VIORTC_REQUESTQ], VIORTC_MSG(hdl), in viortc_set_alarm()
902 ret = viortc_msg_xfer(&viortc->vqs[VIORTC_REQUESTQ], VIORTC_MSG(hdl), in viortc_set_alarm_enabled()
[all …]
H A Dvirtio_vdpa.c263 list_for_each_entry_safe(vq, n, &vdev->vqs, list) in virtio_vdpa_del_vqs()
329 struct virtqueue *vqs[], in virtio_vdpa_find_vqs() argument
351 vqs[i] = NULL; in virtio_vdpa_find_vqs()
355 vqs[i] = virtio_vdpa_setup_vq(vdev, queue_idx++, vqi->callback, in virtio_vdpa_find_vqs()
357 if (IS_ERR(vqs[i])) { in virtio_vdpa_find_vqs()
358 err = PTR_ERR(vqs[i]); in virtio_vdpa_find_vqs()
H A Dvirtio_mmio.c340 list_for_each_entry_safe(vq, n, &vdev->vqs, list) in vm_del_vqs()
454 struct virtqueue *vqs[], in vm_find_vqs() argument
477 vqs[i] = NULL; in vm_find_vqs()
481 vqs[i] = vm_setup_vq(vdev, queue_idx++, vqi->callback, in vm_find_vqs()
483 if (IS_ERR(vqs[i])) { in vm_find_vqs()
485 return PTR_ERR(vqs[i]); in vm_find_vqs()
/linux/net/vmw_vsock/
H A Dvirtio_transport.c32 struct virtqueue *vqs[VSOCK_VQ_MAX]; member
171 vq = vsock->vqs[VSOCK_VQ_TX]; in virtio_transport_send_pkt_work()
191 struct virtqueue *rx_vq = vsock->vqs[VSOCK_VQ_RX]; in virtio_transport_send_pkt_work()
219 struct virtqueue *vq = vsock->vqs[VSOCK_VQ_TX]; in virtio_transport_send_skb_fast_path()
295 struct virtqueue *rx_vq = vsock->vqs[VSOCK_VQ_RX]; in virtio_transport_cancel_pkt()
319 vq = vsock->vqs[VSOCK_VQ_RX]; in virtio_vsock_rx_fill()
354 vq = vsock->vqs[VSOCK_VQ_TX]; in virtio_transport_tx_work()
377 struct virtqueue *vq = vsock->vqs[VSOCK_VQ_RX]; in virtio_transport_more_replies()
393 vq = vsock->vqs[VSOCK_VQ_EVENT]; in virtio_vsock_event_fill_one()
411 virtqueue_kick(vsock->vqs[VSOCK_VQ_EVENT]); in virtio_vsock_event_fill()
[all …]
/linux/drivers/bluetooth/
H A Dvirtio_bt.c25 struct virtqueue *vqs[VIRTBT_NUM_VQS]; member
32 struct virtqueue *vq = vbt->vqs[VIRTBT_VQ_RX]; in virtbt_add_inbuf()
62 virtqueue_kick(vbt->vqs[VIRTBT_VQ_RX]); in virtbt_open_vdev()
77 for (i = 0; i < ARRAY_SIZE(vbt->vqs); i++) { in virtbt_close_vdev()
78 struct virtqueue *vq = vbt->vqs[i]; in virtbt_close_vdev()
103 err = virtqueue_add_outbuf(vbt->vqs[VIRTBT_VQ_TX], sg, 1, skb, in virtbt_send_frame()
110 virtqueue_kick(vbt->vqs[VIRTBT_VQ_TX]); in virtbt_send_frame()
248 skb = virtqueue_get_buf(vbt->vqs[VIRTBT_VQ_RX], &len); in virtbt_rx_work()
265 virtqueue_kick(vbt->vqs[VIRTBT_VQ_RX]); in virtbt_rx_work()
316 err = virtio_find_vqs(vdev, VIRTBT_NUM_VQS, vbt->vqs, vqs_info, NULL); in virtbt_probe()
/linux/drivers/vdpa/vdpa_sim/
H A Dvdpa_sim.c95 struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; in vdpasim_queue_ready()
149 vdpasim_vq_reset(vdpasim, &vdpasim->vqs[i]); in vdpasim_do_reset()
150 vringh_set_iotlb(&vdpasim->vqs[i].vring, &vdpasim->iommu[0], in vdpasim_do_reset()
255 vdpasim->vqs = kzalloc_objs(struct vdpasim_virtqueue, dev_attr->nvqs); in vdpasim_create()
256 if (!vdpasim->vqs) in vdpasim_create()
278 vringh_set_iotlb(&vdpasim->vqs[i].vring, &vdpasim->iommu[0], in vdpasim_create()
303 struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; in vdpasim_set_vq_address()
315 struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; in vdpasim_set_vq_num()
323 struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; in vdpasim_get_vq_size()
334 struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; in vdpasim_kick_vq()
[all …]
/linux/drivers/vdpa/vdpa_user/
H A Dvduse_dev.c121 struct vduse_virtqueue **vqs; member
519 struct vduse_virtqueue *vq = dev->vqs[i]; in vduse_dev_reset()
547 struct vduse_virtqueue *vq = dev->vqs[i]; in vduse_dev_reset()
559 struct vduse_virtqueue *vq = dev->vqs[idx]; in vduse_vdpa_set_vq_address()
596 struct vduse_virtqueue *vq = dev->vqs[idx]; in vduse_vdpa_kick_vq()
609 struct vduse_virtqueue *vq = dev->vqs[idx]; in vduse_vdpa_set_vq_cb()
621 struct vduse_virtqueue *vq = dev->vqs[idx]; in vduse_vdpa_set_vq_num()
629 struct vduse_virtqueue *vq = dev->vqs[idx]; in vduse_vdpa_get_vq_size()
641 struct vduse_virtqueue *vq = dev->vqs[idx]; in vduse_vdpa_set_vq_ready()
672 struct vduse_virtqueue *vq = dev->vqs[idx]; in vduse_vdpa_get_vq_ready()
[all …]
/linux/tools/testing/selftests/arm64/fp/
H A Dsve-probe-vls.c22 static unsigned int vqs[SVE_VQ_MAX]; in main() local
53 vqs[nvqs++] = vq; in main()
60 ksft_print_msg("%u\n", 16 * vqs[nvqs]); in main()
/linux/drivers/net/ethernet/intel/ice/virt/
H A Dqueues.c171 static bool ice_vc_validate_vqs_bitmaps(struct virtchnl_queue_select *vqs) in ice_vc_validate_vqs_bitmaps() argument
173 if ((!vqs->rx_queues && !vqs->tx_queues) || in ice_vc_validate_vqs_bitmaps()
174 vqs->rx_queues >= BIT(ICE_MAX_RSS_QS_PER_VF) || in ice_vc_validate_vqs_bitmaps()
175 vqs->tx_queues >= BIT(ICE_MAX_RSS_QS_PER_VF)) in ice_vc_validate_vqs_bitmaps()
255 struct virtchnl_queue_select *vqs = in ice_vc_ena_qs_msg() local
266 if (!ice_vc_isvalid_vsi_id(vf, vqs->vsi_id)) { in ice_vc_ena_qs_msg()
271 if (!ice_vc_validate_vqs_bitmaps(vqs)) { in ice_vc_ena_qs_msg()
286 q_map = vqs->rx_queues; in ice_vc_ena_qs_msg()
308 q_map = vqs->tx_queues; in ice_vc_ena_qs_msg()
382 struct virtchnl_queue_select *vqs = in ice_vc_dis_qs_msg() local
[all …]
/linux/sound/virtio/
H A Dvirtio_card.c121 struct virtqueue *vqs[VIRTIO_SND_VQ_MAX] = { 0 }; in virtsnd_find_vqs() local
126 rc = virtio_find_vqs(vdev, VIRTIO_SND_VQ_MAX, vqs, vqs_info, NULL); in virtsnd_find_vqs()
133 snd->queues[i].vqueue = vqs[i]; in virtsnd_find_vqs()
136 virtqueue_disable_cb(vqs[VIRTIO_SND_VQ_EVENT]); in virtsnd_find_vqs()
138 n = virtqueue_get_vring_size(vqs[VIRTIO_SND_VQ_EVENT]); in virtsnd_find_vqs()
145 virtsnd_event_send(vqs[VIRTIO_SND_VQ_EVENT], in virtsnd_find_vqs()
/linux/drivers/remoteproc/
H A Dremoteproc_virtio.c171 list_for_each_entry_safe(vq, n, &vdev->vqs, list) { in __rproc_virtio_del_vqs()
184 struct virtqueue *vqs[], in rproc_virtio_find_vqs() argument
194 vqs[i] = NULL; in rproc_virtio_find_vqs()
198 vqs[i] = rp_find_vq(vdev, queue_idx++, vqi->callback, in rproc_virtio_find_vqs()
200 if (IS_ERR(vqs[i])) { in rproc_virtio_find_vqs()
201 ret = PTR_ERR(vqs[i]); in rproc_virtio_find_vqs()
/linux/drivers/vdpa/octeon_ep/
H A Doctep_vdpa_main.c103 if (ioread8(oct_hw->vqs[i].cb_notify_addr)) { in octep_vdpa_intr_handler()
105 iowrite8(0, oct_hw->vqs[i].cb_notify_addr); in octep_vdpa_intr_handler()
107 if (likely(oct_hw->vqs[i].cb.callback)) in octep_vdpa_intr_handler()
108 oct_hw->vqs[i].cb.callback(oct_hw->vqs[i].cb.private); in octep_vdpa_intr_handler()
255 oct_hw->vqs[qid].cb.callback = NULL; in octep_vdpa_reset()
256 oct_hw->vqs[qid].cb.private = NULL; in octep_vdpa_reset()
297 oct_hw->vqs[qid].cb = *cb; in octep_vdpa_set_vq_cb()
343 vp_iowrite32(data, oct_hw->vqs[idx].notify_addr); in octep_vdpa_kick_vq_with_data()
405 area.addr = oct_hw->vqs[idx].notify_pa; in octep_get_vq_notification()
/linux/drivers/s390/virtio/
H A Dvirtio_ccw.c303 static unsigned long *get_airq_indicator(struct virtqueue *vqs[], int nvqs, in get_airq_indicator() argument
313 if (vqs[i]) in get_airq_indicator()
336 if (!vqs[j]) in get_airq_indicator()
339 (unsigned long)vqs[j]); in get_airq_indicator()
543 list_for_each_entry_safe(vq, n, &vdev->vqs, list) in virtio_ccw_del_vqs()
652 struct virtqueue *vqs[], int nvqs, in virtio_ccw_register_adapter_ind() argument
668 indicator_addr = get_airq_indicator(vqs, nvqs, in virtio_ccw_register_adapter_ind()
702 struct virtqueue *vqs[], in virtio_ccw_find_vqs() argument
720 vqs[i] = NULL; in virtio_ccw_find_vqs()
724 vqs[i] = virtio_ccw_setup_vq(vdev, queue_idx++, vqi->callback, in virtio_ccw_find_vqs()
[all …]
/linux/drivers/vdpa/mlx5/net/
H A Dmlx5_vnet.c557 struct mlx5_vdpa_virtqueue *mvq = &ndev->vqs[idx]; in cq_create()
632 struct mlx5_vdpa_virtqueue *mvq = &ndev->vqs[idx]; in cq_destroy()
1244 fill_query_virtqueue_cmd(ndev, &ndev->vqs[start_vq + i], &cmd_mem[i]); in query_virtqueues()
1577 mvq = &ndev->vqs[vq_idx]; in modify_virtqueues()
1612 mvq = &ndev->vqs[vq_idx]; in modify_virtqueues()
1641 mvq = &ndev->vqs[start_vq]; in suspend_vqs()
1661 mvq = &ndev->vqs[vq_idx]; in suspend_vqs()
1684 mvq = &ndev->vqs[start_vq]; in resume_vqs()
1761 list[i] = cpu_to_be32(ndev->vqs[j % ndev->cur_num_vqs].virtq_id); in create_rqt()
1796 list[i] = cpu_to_be32(ndev->vqs[j % num].virtq_id); in modify_rqt()
[all …]
/linux/net/sched/
H A Dsch_gred.c552 static void gred_vqs_apply(struct gred_sched *table, struct nlattr *vqs) in gred_vqs_apply() argument
557 nla_for_each_nested(attr, vqs, rem) { in gred_vqs_apply()
611 struct nlattr *vqs, struct netlink_ext_ack *extack) in gred_vqs_validate() argument
616 err = nla_validate_nested_deprecated(vqs, TCA_GRED_VQ_ENTRY_MAX, in gred_vqs_validate()
621 nla_for_each_nested(attr, vqs, rem) { in gred_vqs_validate()
771 struct nlattr *parms, *vqs, *opts = NULL; in gred_dump() local
852 vqs = nla_nest_start_noflag(skb, TCA_GRED_VQ_LIST); in gred_dump()
853 if (!vqs) in gred_dump()
899 nla_nest_end(skb, vqs); in gred_dump()
/linux/tools/virtio/
H A Dvhost_net_test.c48 struct vq_info vqs[2]; member
194 struct vq_info *info = &dev->vqs[idx]; in vq_info_add()
214 INIT_LIST_HEAD(&dev->vdev.vqs); in vdev_info_init()
523 run_rx_test(&dev, &dev.vqs[0], delayed, nbufs); in main()
524 run_tx_test(&dev, &dev.vqs[1], delayed, nbufs); in main()
H A Dvirtio_test.c42 struct vq_info vqs[1]; member
113 struct vq_info *info = &dev->vqs[dev->nvqs]; in vq_info_add()
132 INIT_LIST_HEAD(&dev->vdev.vqs); in vdev_info_init()
401 run_test(&dev, &dev.vqs[0], delayed, batch, reset, 0x100000); in main()

12