Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1388599

Please consider using __vring_new_virtqueue in mic_virtio

From Andy Lutomirski <luto@kernel.org>
Newsgroups linux.kernel
Subject Please consider using __vring_new_virtqueue in mic_virtio
Date 2016-04-27 04:30 +0200
Message-ID <rsnoK-1L5-13@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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 linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Please consider using __vring_new_virtqueue in mic_virtio Andy Lutomirski <luto@kernel.org> - 2016-04-27 04:30 +0200

csiph-web