|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
18 #ifndef _VNET_DEVICES_VIRTIO_VIRTIO_BUFFERING_H_
19 #define _VNET_DEVICES_VIRTIO_VIRTIO_BUFFERING_H_
21 #define VIRTIO_BUFFERING_DEFAULT_SIZE 1024
22 #define VIRTIO_BUFFERING_TIMEOUT 1e-5
238 s =
format (s,
"packet-buffering: enable\n");
240 s =
format (s,
"packet-buffering: disable\n");
243 "%Usize %u n_buffers %u front %u back %u",
static_always_inline void virtio_vring_buffering_set_timeout(vlib_main_t *vm, virtio_vring_buffering_t *buffering, f64 timeout_expire)
static_always_inline u8 * virtio_vring_buffering_format(u8 *s, va_list *args)
static void clib_mem_free(void *p)
static_always_inline u32 virtio_vring_buffering_read_from_back(virtio_vring_buffering_t *buffering)
#define clib_error_return(e, args...)
static_always_inline u16 virtio_vring_n_buffers(virtio_vring_buffering_t *buffering)
static_always_inline void virtio_vring_buffering_buffers_free(vlib_main_t *vm, virtio_vring_buffering_t *buffering)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static_always_inline u8 virtio_vring_buffering_is_full(virtio_vring_buffering_t *buffering)
#define VIRTIO_BUFFERING_DEFAULT_SIZE
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
static void vlib_buffer_free_from_ring(vlib_main_t *vm, u32 *ring, u32 start, u32 ring_size, u32 n_buffers)
Free buffers from ring.
static_always_inline u8 virtio_vring_buffering_is_enable(virtio_vring_buffering_t *buffering)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
#define VIRTIO_BUFFERING_TIMEOUT
#define vec_validate_aligned(V, I, A)
Make sure vector is long enough for given index (no header, specified alignment)
static_always_inline u32 virtio_vring_buffering_read_from_front(virtio_vring_buffering_t *buffering)
#define static_always_inline
#define CLIB_CACHE_LINE_BYTES
static_always_inline void virtio_vring_buffering_free(vlib_main_t *vm, virtio_vring_buffering_t *buffering)
#define vec_free(V)
Free vector's memory (no header).
static_always_inline u8 virtio_vring_buffering_is_timeout(vlib_main_t *vm, virtio_vring_buffering_t *buffering)
description fragment has unexpected format
static_always_inline void virtio_vring_buffering_set_is_enable(virtio_vring_buffering_t *buffering, u8 is_enable)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static_always_inline clib_error_t * virtio_vring_buffering_init(virtio_vring_buffering_t **buffering, u32 node_index, u16 size)
static f64 vlib_time_now(vlib_main_t *vm)
static_always_inline u8 virtio_vring_buffering_is_empty(virtio_vring_buffering_t *buffering)
static_always_inline u16 virtio_vring_buffering_store_packets(virtio_vring_buffering_t *buffering, u32 *bi, u16 n_store)
static_always_inline void virtio_vring_buffering_schedule_node_on_dispatcher(vlib_main_t *vm, virtio_vring_buffering_t *buffering)
static uword is_pow2(uword x)
static void * clib_mem_alloc(uword size)