OpenAMP Library  353
virtio_dispatch Struct Reference

Virtio device dispatcher functions. More...

#include <virtio.h>

Data Fields

int(* create_virtqueues )(struct virtio_device *vdev, unsigned int flags, unsigned int nvqs, const char *names[], vq_callback callbacks[], void *callback_args[])
 Create virtio queue instances. More...
 
void(* delete_virtqueues )(struct virtio_device *vdev)
 Delete virtio queue instances. More...
 
uint8_t(* get_status )(struct virtio_device *dev)
 Get the status of the virtio device. More...
 
void(* set_status )(struct virtio_device *dev, uint8_t status)
 Set the status of the virtio device. More...
 
uint32_t(* get_features )(struct virtio_device *dev)
 Get the feature exposed by the virtio device. More...
 
void(* set_features )(struct virtio_device *dev, uint32_t feature)
 Set the supported feature (virtio driver only). More...
 
uint32_t(* negotiate_features )(struct virtio_device *dev, uint32_t features)
 Set the supported features negotiate between the features parameter and features supported by the device (virtio driver only). More...
 
void(* read_config )(struct virtio_device *dev, uint32_t offset, void *dst, int length)
 Read a variable amount from the device specific (ie, network) configuration region. More...
 
void(* write_config )(struct virtio_device *dev, uint32_t offset, void *src, int length)
 Write a variable amount from the device specific (ie, network) configuration region. More...
 
void(* reset_device )(struct virtio_device *dev)
 Request a reset of the virtio device. More...
 
void(* notify )(struct virtqueue *vq)
 Notify the other side that a virtio vring as been updated. More...
 

Detailed Description

Virtio device dispatcher functions.

Functions for virtio device configuration as defined in Rusty Russell's paper. The virtio transport layers are expected to implement these functions in their respective codes.

Field Documentation

◆ create_virtqueues

int(* virtio_dispatch::create_virtqueues) (struct virtio_device *vdev, unsigned int flags, unsigned int nvqs, const char *names[], vq_callback callbacks[], void *callback_args[])

Create virtio queue instances.

◆ delete_virtqueues

void(* virtio_dispatch::delete_virtqueues) (struct virtio_device *vdev)

Delete virtio queue instances.

◆ get_features

uint32_t(* virtio_dispatch::get_features) (struct virtio_device *dev)

Get the feature exposed by the virtio device.

◆ get_status

uint8_t(* virtio_dispatch::get_status) (struct virtio_device *dev)

Get the status of the virtio device.

◆ negotiate_features

uint32_t(* virtio_dispatch::negotiate_features) (struct virtio_device *dev, uint32_t features)

Set the supported features negotiate between the features parameter and features supported by the device (virtio driver only).

◆ notify

void(* virtio_dispatch::notify) (struct virtqueue *vq)

Notify the other side that a virtio vring as been updated.

◆ read_config

void(* virtio_dispatch::read_config) (struct virtio_device *dev, uint32_t offset, void *dst, int length)

Read a variable amount from the device specific (ie, network) configuration region.

◆ reset_device

void(* virtio_dispatch::reset_device) (struct virtio_device *dev)

Request a reset of the virtio device.

◆ set_features

void(* virtio_dispatch::set_features) (struct virtio_device *dev, uint32_t feature)

Set the supported feature (virtio driver only).

◆ set_status

void(* virtio_dispatch::set_status) (struct virtio_device *dev, uint8_t status)

Set the status of the virtio device.

◆ write_config

void(* virtio_dispatch::write_config) (struct virtio_device *dev, uint32_t offset, void *src, int length)

Write a variable amount from the device specific (ie, network) configuration region.


The documentation for this struct was generated from the following file: