lkml.org 
[lkml]   [2016]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectPlease consider using __vring_new_virtqueue in mic_virtio
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

\
 
 \ /
  Last update: 2016-04-27 04:41    [W:0.029 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site