FD.io VPP  v18.01.2-1-g9b554f3
Vector Packet Processing
virtio.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  virtio_vring_t
 
struct  virtio_if_t
 
struct  virtio_main_t
 

Macros

#define foreach_virtio_net_features
 
#define foreach_virtio_if_flag
 
#define VIRTIO_RING_FLAG_MASK_INT   1
 

Enumerations

enum  virtio_if_flag_t { foreach_virtio_if_flag }
 
enum  virtio_if_type_t { VIRTIO_IF_TYPE_TAP, VIRTIO_IF_N_TYPES }
 

Functions

clib_error_tvirtio_vring_init (vlib_main_t *vm, virtio_if_t *vif, u16 idx, u16 sz)
 
clib_error_tvirtio_vring_free (vlib_main_t *vm, virtio_if_t *vif, u32 idx)
 
void virtio_free_used_desc (vlib_main_t *vm, virtio_vring_t *vring)
 

Variables

virtio_main_t virtio_main
 
vnet_device_class_t virtio_device_class
 
vlib_node_registration_t virtio_input_node
 (constructor) VLIB_REGISTER_NODE (virtio_input_node) More...
 

Macro Definition Documentation

#define foreach_virtio_if_flag
Value:
_(0, ADMIN_UP, "admin-up") \
_(1, DELETING, "deleting")

Definition at line 56 of file virtio.h.

#define foreach_virtio_net_features
Value:
_ (VIRTIO_NET_F_CSUM, 0) /* Host handles pkts w/ partial csum */ \
_ (VIRTIO_NET_F_GUEST_CSUM, 1) /* Guest handles pkts w/ partial csum */ \
_ (VIRTIO_NET_F_CTRL_GUEST_OFFLOADS, 2) /* Dynamic offload configuration. */ \
_ (VIRTIO_NET_F_MTU, 3) /* Initial MTU advice. */ \
_ (VIRTIO_NET_F_MAC, 5) /* Host has given MAC address. */ \
_ (VIRTIO_NET_F_GSO, 6) /* Host handles pkts w/ any GSO. */ \
_ (VIRTIO_NET_F_GUEST_TSO4, 7) /* Guest can handle TSOv4 in. */ \
_ (VIRTIO_NET_F_GUEST_TSO6, 8) /* Guest can handle TSOv6 in. */ \
_ (VIRTIO_NET_F_GUEST_ECN, 9) /* Guest can handle TSO[6] w/ ECN in. */ \
_ (VIRTIO_NET_F_GUEST_UFO, 10) /* Guest can handle UFO in. */ \
_ (VIRTIO_NET_F_HOST_TSO4, 11) /* Host can handle TSOv4 in. */ \
_ (VIRTIO_NET_F_HOST_TSO6, 12) /* Host can handle TSOv6 in. */ \
_ (VIRTIO_NET_F_HOST_ECN, 13) /* Host can handle TSO[6] w/ ECN in. */ \
_ (VIRTIO_NET_F_HOST_UFO, 14) /* Host can handle UFO in. */ \
_ (VIRTIO_NET_F_MRG_RXBUF, 15) /* Host can merge receive buffers. */ \
_ (VIRTIO_NET_F_STATUS, 16) /* virtio_net_config.status available */ \
_ (VIRTIO_NET_F_CTRL_VQ, 17) /* Control channel available */ \
_ (VIRTIO_NET_F_CTRL_RX, 18) /* Control channel RX mode support */ \
_ (VIRTIO_NET_F_CTRL_VLAN, 19) /* Control channel VLAN filtering */ \
_ (VIRTIO_NET_F_CTRL_RX_EXTRA, 20) /* Extra RX mode control support */ \
_ (VIRTIO_NET_F_GUEST_ANNOUNCE, 21) /* Guest can announce device on the network */ \
_ (VIRTIO_NET_F_MQ, 22) /* Device supports Receive Flow Steering */ \
_ (VIRTIO_NET_F_CTRL_MAC_ADDR, 23) /* Set MAC address */ \
_ (VIRTIO_F_NOTIFY_ON_EMPTY, 24) \
_ (VHOST_F_LOG_ALL, 26) /* Log all write descriptors */ \
_ (VIRTIO_F_ANY_LAYOUT, 27) /* Can the device handle any descripor layout */ \
_ (VIRTIO_RING_F_INDIRECT_DESC, 28) /* Support indirect buffer descriptors */ \
_ (VIRTIO_RING_F_EVENT_IDX, 29) /* The Guest publishes the used index for which it expects an interrupt \
* at the end of the avail ring. Host should ignore the avail->flags field. */ \
/* The Host publishes the avail index for which it expects a kick \
* at the end of the used ring. Guest should ignore the used->flags field. */ \
_ (VIRTIO_F_VERSION_1, 32)
#define VHOST_USER_F_PROTOCOL_FEATURES
Definition: vhost-user.h:35

Definition at line 21 of file virtio.h.

#define VIRTIO_RING_FLAG_MASK_INT   1

Definition at line 84 of file virtio.h.

Enumeration Type Documentation

Enumerator
foreach_virtio_if_flag 

Definition at line 60 of file virtio.h.

Enumerator
VIRTIO_IF_TYPE_TAP 
VIRTIO_IF_N_TYPES 

Definition at line 67 of file virtio.h.

Function Documentation

void virtio_free_used_desc ( vlib_main_t vm,
virtio_vring_t vring 
)
inline

Definition at line 92 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* virtio_vring_free ( vlib_main_t vm,
virtio_if_t vif,
u32  idx 
)

Definition at line 153 of file virtio.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* virtio_vring_init ( vlib_main_t vm,
virtio_if_t vif,
u16  idx,
u16  sz 
)

Definition at line 63 of file virtio.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vnet_device_class_t virtio_device_class
vlib_node_registration_t virtio_input_node

(constructor) VLIB_REGISTER_NODE (virtio_input_node)

Definition at line 284 of file node.c.

virtio_main_t virtio_main

Definition at line 35 of file virtio.c.