Home
last modified time | relevance | path

Searched full:vring (Results 1 – 25 of 114) sorted by relevance

12345

/kernel/linux/linux-5.10/drivers/platform/mellanox/
Dmlxbf-tmfifo.c26 /* Vring size. */
63 * @num: vring size (number of descriptors)
64 * @align: vring alignment size
65 * @index: vring index
66 * @vdev_id: vring virtio id (VIRTIO_ID_xxx)
151 * @vring: Tx/Rx ring
166 struct mlxbf_tmfifo_vring *vring[2]; member
211 struct mlxbf_tmfifo_vring *vring; in mlxbf_tmfifo_free_vrings() local
215 vring = &tm_vdev->vrings[i]; in mlxbf_tmfifo_free_vrings()
216 if (vring->va) { in mlxbf_tmfifo_free_vrings()
[all …]
/kernel/linux/linux-4.19/drivers/net/wireless/ath/wil6210/
Dtxrx.c83 struct wil_ring *vring = &wil->ring_tx[i]; in wil_is_tx_idle() local
84 int vring_index = vring - wil->ring_tx; in wil_is_tx_idle()
90 if (!vring->va || !txdata->enabled) { in wil_is_tx_idle()
98 while (!wil_ring_is_empty(vring)) { in wil_is_tx_idle()
106 "tx vring is not empty -> NAPI\n"); in wil_is_tx_idle()
111 if (!vring->va || !txdata->enabled) in wil_is_tx_idle()
122 static int wil_vring_alloc(struct wil6210_priv *wil, struct wil_ring *vring) in wil_vring_alloc() argument
125 size_t sz = vring->size * sizeof(vring->va[0]); in wil_vring_alloc()
130 BUILD_BUG_ON(sizeof(vring->va[0]) != 32); in wil_vring_alloc()
132 vring->swhead = 0; in wil_vring_alloc()
[all …]
Dtrace.h225 TP_PROTO(u8 vring, u16 index, unsigned int len, u8 frags),
226 TP_ARGS(vring, index, len, frags),
228 __field(u8, vring)
234 __entry->vring = vring;
239 TP_printk("vring %d index %d len %d frags %d",
240 __entry->vring, __entry->index, __entry->len, __entry->frags)
244 TP_PROTO(u8 vring, u16 index, unsigned int len, u8 err),
245 TP_ARGS(vring, index, len, err),
247 __field(u8, vring)
253 __entry->vring = vring;
[all …]
/kernel/linux/linux-5.10/drivers/net/wireless/ath/wil6210/
Dtxrx.c71 struct wil_ring *vring = &wil->ring_tx[i]; in wil_is_tx_idle() local
72 int vring_index = vring - wil->ring_tx; in wil_is_tx_idle()
78 if (!vring->va || !txdata->enabled) { in wil_is_tx_idle()
86 while (!wil_ring_is_empty(vring)) { in wil_is_tx_idle()
94 "tx vring is not empty -> NAPI\n"); in wil_is_tx_idle()
99 if (!vring->va || !txdata->enabled) in wil_is_tx_idle()
110 static int wil_vring_alloc(struct wil6210_priv *wil, struct wil_ring *vring) in wil_vring_alloc() argument
113 size_t sz = vring->size * sizeof(vring->va[0]); in wil_vring_alloc()
118 BUILD_BUG_ON(sizeof(vring->va[0]) != 32); in wil_vring_alloc()
120 vring->swhead = 0; in wil_vring_alloc()
[all …]
Dtrace.h215 TP_PROTO(u8 vring, u16 index, unsigned int len, u8 frags),
216 TP_ARGS(vring, index, len, frags),
218 __field(u8, vring)
224 __entry->vring = vring;
229 TP_printk("vring %d index %d len %d frags %d",
230 __entry->vring, __entry->index, __entry->len, __entry->frags)
234 TP_PROTO(u8 vring, u16 index, unsigned int len, u8 err),
235 TP_ARGS(vring, index, len, err),
237 __field(u8, vring)
243 __entry->vring = vring;
[all …]
/kernel/linux/linux-5.10/drivers/vdpa/ifcvf/
Difcvf_main.c33 struct vring_info *vring = arg; in ifcvf_intr_handler() local
35 if (vring->cb.callback) in ifcvf_intr_handler()
36 return vring->cb.callback(vring->cb.private); in ifcvf_intr_handler()
54 devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); in ifcvf_free_irq()
55 vf->vring[i].irq = -EINVAL; in ifcvf_free_irq()
88 snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n", in ifcvf_request_irq()
94 vf->vring[i].msix_name, in ifcvf_request_irq()
95 &vf->vring[i]); in ifcvf_request_irq()
104 vf->vring[i].irq = irq; in ifcvf_request_irq()
133 vf->vring[i].cb.callback = NULL; in ifcvf_stop_datapath()
[all …]
Difcvf_base.c162 hw->vring[i].notify_addr = hw->notify_base + in ifcvf_init_hw()
299 hw->vring[qid].last_avail_idx = num; in ifcvf_set_vq_state()
321 if (!hw->vring[i].ready) in ifcvf_hw_enable()
325 ifc_iowrite64_twopart(hw->vring[i].desc, &cfg->queue_desc_lo, in ifcvf_hw_enable()
327 ifc_iowrite64_twopart(hw->vring[i].avail, &cfg->queue_avail_lo, in ifcvf_hw_enable()
329 ifc_iowrite64_twopart(hw->vring[i].used, &cfg->queue_used_lo, in ifcvf_hw_enable()
331 ifc_iowrite16(hw->vring[i].size, &cfg->queue_size); in ifcvf_hw_enable()
341 ifcvf_set_vq_state(hw, i, hw->vring[i].last_avail_idx); in ifcvf_hw_enable()
389 ifc_iowrite16(qid, hw->vring[qid].notify_addr); in ifcvf_notify_queue()
/kernel/linux/linux-4.19/drivers/vhost/
Dvringh.c31 /* Returns vring->num if empty, -ve on error. */
40 err = getu16(vrh, &avail_idx, &vrh->vring.avail->idx); in __vringh_get_head()
43 &vrh->vring.avail->idx); in __vringh_get_head()
48 return vrh->vring.num; in __vringh_get_head()
53 i = *last_avail_idx & (vrh->vring.num - 1); in __vringh_get_head()
55 err = getu16(vrh, &head, &vrh->vring.avail->ring[i]); in __vringh_get_head()
58 *last_avail_idx, &vrh->vring.avail->ring[i]); in __vringh_get_head()
62 if (head >= vrh->vring.num) { in __vringh_get_head()
64 head, vrh->vring.num); in __vringh_get_head()
214 *descs = vrh->vring.desc; in return_from_indirect()
[all …]
/kernel/linux/linux-5.10/drivers/vhost/
Dvringh.c37 /* Returns vring->num if empty, -ve on error. */
46 err = getu16(vrh, &avail_idx, &vrh->vring.avail->idx); in __vringh_get_head()
49 &vrh->vring.avail->idx); in __vringh_get_head()
54 return vrh->vring.num; in __vringh_get_head()
59 i = *last_avail_idx & (vrh->vring.num - 1); in __vringh_get_head()
61 err = getu16(vrh, &head, &vrh->vring.avail->ring[i]); in __vringh_get_head()
64 *last_avail_idx, &vrh->vring.avail->ring[i]); in __vringh_get_head()
68 if (head >= vrh->vring.num) { in __vringh_get_head()
70 head, vrh->vring.num); in __vringh_get_head()
223 *descs = vrh->vring.desc; in return_from_indirect()
[all …]
/kernel/linux/linux-4.19/drivers/virtio/
Dvirtio_ring.c67 struct vring vring; member
166 * making all of the arch DMA ops work on the vring device itself
308 WARN_ON_ONCE(total_sg > vq->vring.num && !vq->indirect); in virtqueue_add()
319 desc = vq->vring.desc; in virtqueue_add()
375 vq->vring.desc[head].flags = cpu_to_virtio16(_vq->vdev, VRING_DESC_F_INDIRECT); in virtqueue_add()
376 vq->vring.desc[head].addr = cpu_to_virtio64(_vq->vdev, addr); in virtqueue_add()
378 vq->vring.desc[head].len = cpu_to_virtio32(_vq->vdev, total_sg * sizeof(struct vring_desc)); in virtqueue_add()
386 vq->free_head = virtio16_to_cpu(_vq->vdev, vq->vring.desc[head].next); in virtqueue_add()
399 avail = vq->avail_idx_shadow & (vq->vring.num - 1); in virtqueue_add()
400 vq->vring.avail->ring[avail] = cpu_to_virtio16(_vq->vdev, head); in virtqueue_add()
[all …]
/kernel/linux/linux-5.10/drivers/virtio/
Dvirtio_ring.c120 struct vring vring; member
147 } vring; member
316 * making all of the arch DMA ops work on the vring device itself
451 WARN_ON_ONCE(total_sg > vq->split.vring.num && !vq->indirect); in virtqueue_add_split()
462 desc = vq->split.vring.desc; in virtqueue_add_split()
518 vq->split.vring.desc[head].flags = cpu_to_virtio16(_vq->vdev, in virtqueue_add_split()
520 vq->split.vring.desc[head].addr = cpu_to_virtio64(_vq->vdev, in virtqueue_add_split()
523 vq->split.vring.desc[head].len = cpu_to_virtio32(_vq->vdev, in virtqueue_add_split()
533 vq->split.vring.desc[head].next); in virtqueue_add_split()
546 avail = vq->split.avail_idx_shadow & (vq->split.vring.num - 1); in virtqueue_add_split()
[all …]
/kernel/linux/linux-4.19/tools/virtio/
Dvringh_test.c116 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()
188 vring_init(&vrh.vring, RINGSIZE, host_map, ALIGN); in parallel_test()
190 vrh.vring.desc, vrh.vring.avail, vrh.vring.used); in parallel_test()
490 vring_init(&vrh.vring, RINGSIZE, __user_addr_min, ALIGN); in main()
492 vrh.vring.desc, vrh.vring.avail, vrh.vring.used); in main()
648 assert(vrh.vring.used->idx % RINGSIZE != 0); in main()
663 struct vring vring; in main() local
683 vring_init(&vring, RINGSIZE, __user_addr_min, ALIGN); in main()
[all …]
Dvirtio_test.c31 struct vring vring; member
68 .desc_user_addr = (uint64_t)(unsigned long)info->vring.desc, in vhost_vq_setup()
69 .avail_user_addr = (uint64_t)(unsigned long)info->vring.avail, in vhost_vq_setup()
70 .used_user_addr = (uint64_t)(unsigned long)info->vring.used, in vhost_vq_setup()
75 state.num = info->vring.num; in vhost_vq_setup()
101 vring_init(&info->vring, num, info->ring, 4096); in vq_info_add()
103 info->vring.num, 4096, &dev->vdev, in vq_info_add()
/kernel/linux/linux-5.10/tools/virtio/
Dvringh_test.c116 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()
188 vring_init(&vrh.vring, RINGSIZE, host_map, ALIGN); in parallel_test()
190 vrh.vring.desc, vrh.vring.avail, vrh.vring.used); in parallel_test()
492 vring_init(&vrh.vring, RINGSIZE, __user_addr_min, ALIGN); in main()
494 vrh.vring.desc, vrh.vring.avail, vrh.vring.used); in main()
650 assert(vrh.vring.used->idx % RINGSIZE != 0); in main()
665 struct vring vring; in main() local
685 vring_init(&vring, RINGSIZE, __user_addr_min, ALIGN); in main()
[all …]
Dvirtio_test.c34 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()
105 info->vq = __vring_new_virtqueue(info->idx, info->vring, vdev, true, in vq_reset()
192 batch = (random() % vq->vring.num) + 1; in run_test()
235 vq_reset(vq, vq->vring.num, &dev->vdev); in run_test()
/kernel/linux/linux-5.10/include/linux/
Dvringh.h3 * Linux host-side vring helpers; for when the kernel needs to access
4 * someone else's vring.
43 /* The vring (note: it may contain user pointers!) */
44 struct vring vring; member
46 /* IOTLB for this vring */
54 * struct vringh_config_ops - ops for creating a host vring from a virtio driver
59 * callbacks: array of driver callbacks, for each host vring
72 /* The memory the vring can access, and what offset to apply. */
Dremoteproc.h242 * struct fw_rsc_vdev_vring - vring descriptor entry
244 * @align: the alignment between the consumer and producer parts of the vring
245 * @num: num of buffers supported by this vring (must be power of two)
246 * @notifyid is a unique rproc-wide notify index for this vring. This notify
248 * vring is triggered.
255 * the remote processor is expecting the vring, or indicate that
256 * dynamically allocation of the vring's device address is supported.
280 * @vring is an array of @num_of_vrings entries of 'struct fw_rsc_vdev_vring'.
310 struct fw_rsc_vdev_vring vring[]; member
579 * struct rproc_vring - remoteproc vring state
[all …]
/kernel/linux/linux-4.19/include/linux/
Dremoteproc.h237 * struct fw_rsc_vdev_vring - vring descriptor entry
239 * @align: the alignment between the consumer and producer parts of the vring
240 * @num: num of buffers supported by this vring (must be power of two)
241 * @notifyid is a unique rproc-wide notify index for this vring. This notify
243 * vring is triggered.
250 * the remote processor is expecting the vring, or indicate that
251 * dynamically allocation of the vring's device address is supported.
275 * @vring is an array of @num_of_vrings entries of 'struct fw_rsc_vdev_vring'.
305 struct fw_rsc_vdev_vring vring[0]; member
500 * struct rproc_vring - remoteproc vring state
[all …]
Dvringh.h2 * Linux host-side vring helpers; for when the kernel needs to access
3 * someone else's vring.
52 /* The vring (note: it may contain user pointers!) */
53 struct vring vring; member
60 * struct vringh_config_ops - ops for creating a host vring from a virtio driver
65 * callbacks: array of driver callbacks, for each host vring
78 /* The memory the vring can access, and what offset to apply. */
/kernel/linux/linux-4.19/drivers/misc/mic/vop/
Dvop_debugfs.c145 int num = vrh->vring.num; in vop_vdev_info_show()
149 desc = vrh->vring.desc; in vop_vdev_info_show()
150 seq_printf(s, "vring i %d avail_idx %d", in vop_vdev_info_show()
151 i, vvr->vring.info->avail_idx & (num - 1)); in vop_vdev_info_show()
152 seq_printf(s, " vring i %d avail_idx %d\n", in vop_vdev_info_show()
153 i, vvr->vring.info->avail_idx); in vop_vdev_info_show()
166 avail = vrh->vring.avail; in vop_vdev_info_show()
177 used = vrh->vring.used; in vop_vdev_info_show()
/kernel/linux/linux-4.19/arch/arm/boot/dts/
Dkeystone-k2hk.dtsi167 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";
/kernel/linux/linux-5.10/arch/arm/boot/dts/
Dkeystone-k2hk.dtsi167 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";
/kernel/linux/linux-4.19/include/uapi/linux/
Dmic_common.h123 * The alignment to use between consumer and producer parts of vring.
132 * Max vring entries (power of 2) to ensure desc and avail rings
147 * struct _mic_vring_info - Host vring info exposed to userspace backend
159 * struct mic_vring - Vring information.
162 * @info: Host vring information exposed to the userspace backend for the
168 struct vring vr;
/kernel/linux/linux-4.19/drivers/remoteproc/
Dremoteproc_core.c208 struct rproc_vring *rvring = &rvdev->vring[i]; in rproc_alloc_vring()
214 /* actual size of vring (in bytes) */ in rproc_alloc_vring()
218 * Allocate non-cacheable memory for the vring. In the future in rproc_alloc_vring()
228 * Assign an rproc-wide unique index for this vring in rproc_alloc_vring()
244 dev_dbg(dev, "vring%d: va %pK dma %pad size 0x%x idr %d\n", in rproc_alloc_vring()
252 * Let the rproc know the notifyid and da of this vring. in rproc_alloc_vring()
258 rsc->vring[i].da = dma; in rproc_alloc_vring()
259 rsc->vring[i].notifyid = notifyid; in rproc_alloc_vring()
268 struct fw_rsc_vdev_vring *vring = &rsc->vring[i]; in rproc_parse_vring() local
269 struct rproc_vring *rvring = &rvdev->vring[i]; in rproc_parse_vring()
[all …]
/kernel/linux/linux-5.10/drivers/remoteproc/
Dremoteproc_virtio.c81 if (id >= ARRAY_SIZE(rvdev->vring)) in rp_find_vq()
93 rvring = &rvdev->vring[id]; in rp_find_vq()
97 /* zero vring */ in rp_find_vq()
101 dev_dbg(dev, "vring%d: va %pK qsz %d notifyid %d\n", in rp_find_vq()
119 /* Update vring in resource table */ in rp_find_vq()
121 rsc->vring[id].da = mem->da; in rp_find_vq()
259 cfg = &rsc->vring[rsc->num_of_vrings]; in rproc_virtio_get()
277 cfg = &rsc->vring[rsc->num_of_vrings]; in rproc_virtio_set()
413 /* Reference the vdev and vring allocations */ in rproc_add_virtio_dev()

12345