• M
    contrib: add libvhost-user · 7b2e5c65
    Marc-André Lureau 提交于
    Add a library to help implementing vhost-user backend (or slave).
    
    Dealing with vhost-user as an application developer isn't so easy: you
    have all the trouble with any protocol: validation, unix ancillary data,
    shared memory, eventfd, logging, and on top of that you need to deal
    with virtio queues, if possible efficiently.
    
    qemu test has a nice vhost-user testing application vhost-user-bridge,
    which implements most of vhost-user, and virtio.c which implements
    virtqueues manipulation. Based on these two, I tried to make a simple
    library, reusable for tests or development of new vhost-user scenarios.
    Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
    [Felipe: set used_idx copy on SET_VRING_ADDR and update shadow avail idx
     on SET_VRING_BASE]
    Signed-off-by: NFelipe Franciosi <felipe@nutanix.com>
    Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
    7b2e5c65
libvhost-user.h 11.1 KB