Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1388599 > unrolled thread
| Started by | Andy Lutomirski <luto@kernel.org> |
|---|---|
| First post | 2016-04-27 04:30 +0200 |
| Last post | 2016-04-27 04:30 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
Please consider using __vring_new_virtqueue in mic_virtio Andy Lutomirski <luto@kernel.org> - 2016-04-27 04:30 +0200
| From | Andy Lutomirski <luto@kernel.org> |
|---|---|
| Date | 2016-04-27 04:30 +0200 |
| Subject | Please consider using __vring_new_virtqueue in mic_virtio |
| Message-ID | <rsnoK-1L5-13@gated-at.bofh.it> |
mic_virtio has a big hack to set up a custom ring, like this:
/*
* To reassign the used ring here we are directly accessing
* struct vring_virtqueue which is a private data structure
* in virtio_ring.c. At the minimum, a BUILD_BUG_ON() in
* vring_new_virtqueue() would ensure that
* (&vq->vring == (struct vring *) (&vq->vq + 1));
*/
vr = (struct vring *)(vq + 1);
vr->used = used;\
I added a more flexible API __vring_new_virtqueue that you might be
able to use to clean this up in:
commit 2a2d1382fe9dccfce6f9c60a9c9fd2f0fe5bcf2b
Author: Andy Lutomirski <luto@kernel.org>
Date: Tue Feb 2 21:46:37 2016 -0800
virtio: Add improved queue allocation API
Please consider either using it or trying to use
vring_create_virtqueue and updating it to fit your needs if
appropriate.
I didn't btry to do it myself because I don't have the hardware.
Thanks,
Andy
Back to top | Article view | linux.kernel
csiph-web