ReactOS 0.4.16-dev-295-g4aee028
VirtIO.h File Reference
#include "virtio_ring.h"
Include dependency graph for VirtIO.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  VirtIOBufferDescriptor
 
struct  virtqueue
 

Macros

#define scatterlist   VirtIOBufferDescriptor
 

Typedefs

typedef int(* proc_virtqueue_add_buf) (struct virtqueue *vq, struct scatterlist sg[], unsigned int out_num, unsigned int in_num, void *opaque, void *va_indirect, ULONGLONG phys_indirect)
 
typedef bool(* proc_virtqueue_kick_prepare) (struct virtqueue *vq)
 
typedef void(* proc_virtqueue_kick_always) (struct virtqueue *vq)
 
typedef void *(* proc_virtqueue_get_buf) (struct virtqueue *vq, unsigned int *len)
 
typedef void(* proc_virtqueue_disable_cb) (struct virtqueue *vq)
 
typedef bool(* proc_virtqueue_enable_cb) (struct virtqueue *vq)
 
typedef bool(* proc_virtqueue_enable_cb_delayed) (struct virtqueue *vq)
 
typedef void *(* proc_virtqueue_detach_unused_buf) (struct virtqueue *vq)
 
typedef BOOLEAN(* proc_virtqueue_is_interrupt_enabled) (struct virtqueue *vq)
 
typedef BOOLEAN(* proc_virtqueue_has_buf) (struct virtqueue *vq)
 
typedef void(* proc_virtqueue_shutdown) (struct virtqueue *vq)
 

Functions

static int virtqueue_add_buf (struct virtqueue *vq, struct scatterlist sg[], unsigned int out_num, unsigned int in_num, void *opaque, void *va_indirect, ULONGLONG phys_indirect)
 
static bool virtqueue_kick_prepare (struct virtqueue *vq)
 
static void virtqueue_kick_always (struct virtqueue *vq)
 
static voidvirtqueue_get_buf (struct virtqueue *vq, unsigned int *len)
 
static void virtqueue_disable_cb (struct virtqueue *vq)
 
static bool virtqueue_enable_cb (struct virtqueue *vq)
 
static bool virtqueue_enable_cb_delayed (struct virtqueue *vq)
 
static voidvirtqueue_detach_unused_buf (struct virtqueue *vq)
 
static BOOLEAN virtqueue_is_interrupt_enabled (struct virtqueue *vq)
 
static BOOLEAN virtqueue_has_buf (struct virtqueue *vq)
 
static void virtqueue_shutdown (struct virtqueue *vq)
 
void virtqueue_notify (struct virtqueue *vq)
 
void virtqueue_kick (struct virtqueue *vq)
 

Macro Definition Documentation

◆ scatterlist

#define scatterlist   VirtIOBufferDescriptor

Definition at line 6 of file VirtIO.h.

Typedef Documentation

◆ proc_virtqueue_add_buf

typedef int(* proc_virtqueue_add_buf) (struct virtqueue *vq, struct scatterlist sg[], unsigned int out_num, unsigned int in_num, void *opaque, void *va_indirect, ULONGLONG phys_indirect)

Definition at line 13 of file VirtIO.h.

◆ proc_virtqueue_detach_unused_buf

typedef void *(* proc_virtqueue_detach_unused_buf) (struct virtqueue *vq)

Definition at line 34 of file VirtIO.h.

◆ proc_virtqueue_disable_cb

typedef void(* proc_virtqueue_disable_cb) (struct virtqueue *vq)

Definition at line 28 of file VirtIO.h.

◆ proc_virtqueue_enable_cb

typedef bool(* proc_virtqueue_enable_cb) (struct virtqueue *vq)

Definition at line 30 of file VirtIO.h.

◆ proc_virtqueue_enable_cb_delayed

typedef bool(* proc_virtqueue_enable_cb_delayed) (struct virtqueue *vq)

Definition at line 32 of file VirtIO.h.

◆ proc_virtqueue_get_buf

typedef void *(* proc_virtqueue_get_buf) (struct virtqueue *vq, unsigned int *len)

Definition at line 26 of file VirtIO.h.

◆ proc_virtqueue_has_buf

typedef BOOLEAN(* proc_virtqueue_has_buf) (struct virtqueue *vq)

Definition at line 38 of file VirtIO.h.

◆ proc_virtqueue_is_interrupt_enabled

typedef BOOLEAN(* proc_virtqueue_is_interrupt_enabled) (struct virtqueue *vq)

Definition at line 36 of file VirtIO.h.

◆ proc_virtqueue_kick_always

typedef void(* proc_virtqueue_kick_always) (struct virtqueue *vq)

Definition at line 24 of file VirtIO.h.

◆ proc_virtqueue_kick_prepare

typedef bool(* proc_virtqueue_kick_prepare) (struct virtqueue *vq)

Definition at line 22 of file VirtIO.h.

◆ proc_virtqueue_shutdown

typedef void(* proc_virtqueue_shutdown) (struct virtqueue *vq)

Definition at line 40 of file VirtIO.h.

Function Documentation

◆ virtqueue_add_buf()

static int virtqueue_add_buf ( struct virtqueue vq,
struct scatterlist  sg[],
unsigned int  out_num,
unsigned int  in_num,
void opaque,
void va_indirect,
ULONGLONG  phys_indirect 
)
inlinestatic

Definition at line 63 of file VirtIO.h.

71{
72 return vq->add_buf(vq, sg, out_num, in_num, opaque, va_indirect, phys_indirect);
73}
proc_virtqueue_add_buf add_buf
Definition: VirtIO.h:50

Referenced by AddRxBufferToQueue(), ParaNdis_DoCopyPacketData(), ParaNdis_DoSubmitPacket(), and SendControlMessage().

◆ virtqueue_detach_unused_buf()

static void * virtqueue_detach_unused_buf ( struct virtqueue vq)
inlinestatic

Definition at line 105 of file VirtIO.h.

106{
107 return vq->detach_unused_buf(vq);
108}
proc_virtqueue_detach_unused_buf detach_unused_buf
Definition: VirtIO.h:57

◆ virtqueue_disable_cb()

static void virtqueue_disable_cb ( struct virtqueue vq)
inlinestatic

Definition at line 90 of file VirtIO.h.

91{
92 vq->disable_cb(vq);
93}
proc_virtqueue_disable_cb disable_cb
Definition: VirtIO.h:54

Referenced by ParaNdis_VirtIODisableIrqSynchronized(), and RestartQueueSynchronously().

◆ virtqueue_enable_cb()

static bool virtqueue_enable_cb ( struct virtqueue vq)
inlinestatic

Definition at line 95 of file VirtIO.h.

96{
97 return vq->enable_cb(vq);
98}
proc_virtqueue_enable_cb enable_cb
Definition: VirtIO.h:55

Referenced by ParaNdis_VirtIOEnableIrqSynchronized(), and RestartQueueSynchronously().

◆ virtqueue_enable_cb_delayed()

static bool virtqueue_enable_cb_delayed ( struct virtqueue vq)
inlinestatic

Definition at line 100 of file VirtIO.h.

101{
102 return vq->enable_cb_delayed(vq);
103}
proc_virtqueue_enable_cb_delayed enable_cb_delayed
Definition: VirtIO.h:56

Referenced by ParaNdis_DoSubmitPacket().

◆ virtqueue_get_buf()

static void * virtqueue_get_buf ( struct virtqueue vq,
unsigned int len 
)
inlinestatic

Definition at line 85 of file VirtIO.h.

86{
87 return vq->get_buf(vq, len);
88}
GLenum GLsizei len
Definition: glext.h:6722
proc_virtqueue_get_buf get_buf
Definition: VirtIO.h:53

Referenced by ParaNdis_ProcessRxPath(), ParaNdis_VirtIONetReleaseTransmitBuffers(), and SendControlMessage().

◆ virtqueue_has_buf()

static BOOLEAN virtqueue_has_buf ( struct virtqueue vq)
inlinestatic

Definition at line 115 of file VirtIO.h.

116{
117 return vq->has_buf(vq);
118}
proc_virtqueue_has_buf has_buf
Definition: VirtIO.h:59

◆ virtqueue_is_interrupt_enabled()

static BOOLEAN virtqueue_is_interrupt_enabled ( struct virtqueue vq)
inlinestatic

Definition at line 110 of file VirtIO.h.

111{
112 return vq->is_interrupt_enabled(vq);
113}
proc_virtqueue_is_interrupt_enabled is_interrupt_enabled
Definition: VirtIO.h:58

Referenced by ParaNDIS_IsQueueInterruptEnabled(), virtqueue_disable_cb_split(), virtqueue_enable_cb_delayed_split(), virtqueue_enable_cb_split(), and virtqueue_get_buf_split().

◆ virtqueue_kick()

void virtqueue_kick ( struct virtqueue vq)

Definition at line 406 of file VirtIOPCICommon.c.

407{
408 if (virtqueue_kick_prepare(vq)) {
410 }
411}
void virtqueue_notify(struct virtqueue *vq)
static bool virtqueue_kick_prepare(struct virtqueue *vq)
Definition: VirtIO.h:75

Referenced by ParaNdis_DPCWorkBody(), ParaNdis_PowerOn(), ParaNdis_ProcessTx(), and PrepareReceiveBuffers().

◆ virtqueue_kick_always()

static void virtqueue_kick_always ( struct virtqueue vq)
inlinestatic

Definition at line 80 of file VirtIO.h.

81{
82 vq->kick_always(vq);
83}
proc_virtqueue_kick_always kick_always
Definition: VirtIO.h:52

Referenced by ParaNdis_DoSubmitPacket(), ParaNdis_DPCWorkBody(), ParaNdis_ProcessTx(), ReuseReceiveBufferRegular(), and SendControlMessage().

◆ virtqueue_kick_prepare()

static bool virtqueue_kick_prepare ( struct virtqueue vq)
inlinestatic

Definition at line 75 of file VirtIO.h.

76{
77 return vq->kick_prepare(vq);
78}
proc_virtqueue_kick_prepare kick_prepare
Definition: VirtIO.h:51

Referenced by virtqueue_kick().

◆ virtqueue_notify()

void virtqueue_notify ( struct virtqueue vq)

Definition at line 401 of file VirtIOPCICommon.c.

402{
403 vq->notification_cb(vq);
404}
void(* notification_cb)(struct virtqueue *vq)
Definition: VirtIO.h:46

Referenced by virtqueue_kick(), virtqueue_kick_always_packed(), and virtqueue_kick_always_split().

◆ virtqueue_shutdown()

static void virtqueue_shutdown ( struct virtqueue vq)
inlinestatic

Definition at line 120 of file VirtIO.h.

121{
122 vq->shutdown(vq);
123}
proc_virtqueue_shutdown shutdown
Definition: VirtIO.h:60

Referenced by ParaNdis_PowerOff(), vio_modern_del_vq(), and vio_modern_setup_vq().