|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
15 #ifndef __VIRTIO_INLINE_H__
16 #define __VIRTIO_INLINE_H__
18 #define foreach_virtio_input_error \
19 _ (BUFFER_ALLOC, "buffer alloc error") \
20 _ (UNKNOWN, "unknown")
24 #define _(f, s) VIRTIO_INPUT_ERROR_##f,
35 u16 used,
next, avail, n_slots, n_refill;
42 if (sz - used < sz / 8)
73 d->
addr = ((
type == VIRTIO_IF_TYPE_PCI) ?
100 u16 used,
next, n_slots, n_refill,
flags = 0, first_desc_flags;
110 n_refill =
clib_min (sz - used, 64);
136 d->addr = ((
type == VIRTIO_IF_TYPE_PCI) ?
148 first_desc_flags =
flags;
166 if (vring->
device_event->flags != VRING_EVENT_F_DISABLE)
static uword vlib_buffer_get_current_pa(vlib_main_t *vm, vlib_buffer_t *b)
static __clib_warn_unused_result u32 vlib_buffer_alloc_to_ring_from_pool(vlib_main_t *vm, u32 *ring, u32 start, u32 ring_size, u32 n_buffers, u8 buffer_pool_index)
Allocate buffers into ring from specific buffer pool.
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static uword pointer_to_uword(const void *p)
static_always_inline void virtio_kick(vlib_main_t *vm, virtio_vring_t *vring, virtio_if_t *vif)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
#define VRING_DESC_F_USED
#define VRING_DESC_F_WRITE
static void vlib_error_count(vlib_main_t *vm, uword node_index, uword counter, uword increment)
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
static_always_inline void virtio_refill_vring_packed(vlib_main_t *vm, virtio_if_t *vif, virtio_if_type_t type, virtio_vring_t *vring, const int hdr_sz, u32 node_index)
#define CLIB_MEMORY_STORE_BARRIER()
#define VRING_DESC_F_AVAIL
#define static_always_inline
#define clib_atomic_load_seq_cst(a)
#define CLIB_MEMORY_BARRIER()
#define VRING_USED_F_NO_NOTIFY
static_always_inline u32 vlib_buffer_get_default_data_size(vlib_main_t *vm)
vring_packed_desc_t * packed_desc
#define clib_atomic_store_seq_cst(a, b)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
static_always_inline void virtio_refill_vring_split(vlib_main_t *vm, virtio_if_t *vif, virtio_if_type_t type, virtio_vring_t *vring, const int hdr_sz, u32 node_index)
#define foreach_virtio_input_error
vring_desc_event_t * device_event
vl_api_fib_path_type_t type
VLIB buffer representation.
vl_api_wireguard_peer_flags_t flags