]> git.baikalelectronics.ru Git - kernel.git/commit
virtio: Introduce vringh wrappers in virtio_config
authorSjur Brændeland <sjur.brandeland@stericsson.com>
Wed, 20 Mar 2013 03:21:24 +0000 (13:51 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 20 Mar 2013 03:36:05 +0000 (14:06 +1030)
commit410cbf628f9434a2d4f5ffee86298f5e5f858245
tree5993020791a65623200b45393ccd63b342d5a933
parent402e9c881f338c084db6449548ddb2c09b1fcb20
virtio: Introduce vringh wrappers in virtio_config

Add wrappers for the host vrings to support loose
coupling between the virtio device and driver.

A new struct vringh_config_ops with the functions
find_vrhs() and del_vrhs() is added to the virtio_device
struct. This enables virtio drivers to manage virtio
host rings without detailed knowledge of how the
vrings are created and deleted.

The function vringh_notify() is added so vringh clients
can notify the other side that buffers are added to the
used-ring.

Cc: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (constified vringh_config)
include/linux/virtio.h
include/linux/vringh.h