15 #ifndef __included_ioam_export_h__ 16 #define __included_ioam_export_h__ 79 #define DEFAULT_EXPORT_SIZE (3 * CLIB_CACHE_LINE_BYTES) 84 #define DEFAULT_EXPORT_RECORDS 7 168 for (i=0; i < no_of_threads; i++)
172 memset(eb, 0,
sizeof (*eb));
186 #define IPFIX_IOAM_EXPORT_ID 272 238 udp->
src_port = clib_host_to_net_u16 (4939 );
239 udp->
dst_port = clib_host_to_net_u16 (4939);
300 (sizeof (*ip) +
sizeof (*udp) +
303 (sizeof (*ip) +
sizeof (*udp)));
sll srl srl sll sra u16x4 i
#define DEFAULT_EXPORT_RECORDS
Fixed length block allocator.
u32 export_process_node_index
static f64 vlib_time_now(vlib_main_t *vm)
vlib_node_registration_t export_node
(constructor) VLIB_REGISTER_NODE (export_node)
struct _vlib_node_registration vlib_node_registration_t
vlib_worker_thread_t * vlib_worker_threads
static int ioam_export_send_buffer(vlib_main_t *vm, ioam_export_buffer_t *eb)
#define vec_validate_aligned(V, I, A)
Make sure vector is long enough for given index (no header, specified alignment)
ip4_address_t ipfix_collector
vlib_node_registration_t ip4_lookup_node
(constructor) VLIB_REGISTER_NODE (ip4_lookup_node)
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
#define pool_alloc_aligned(P, N, A)
Allocate N more free elements to pool (general version).
ioam_export_buffer_t * buffer_pool
ipfix_data_packet_t ipfix
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
struct ioam_export_buffer ioam_export_buffer_t
#define IPFIX_IOAM_EXPORT_ID
static int ioam_export_header_create(ip4_address_t *collector_address, ip4_address_t *src_address)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
u16 current_length
Nbytes between current data and the end of this buffer.
static ioam_export_buffer_t * ioam_export_get_my_buffer(u32 thread_id)
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
static u32 version_length(u16 length)
#define pool_get_aligned(P, E, A)
Allocate an object E from a pool P (general version).
u8 records_in_this_buffer
#define pool_free(p)
Free a pool.
#define vec_free(V)
Free vector's memory (no header).
ip4_address_t src_address
#define clib_memcpy(a, b, c)
#define VLIB_BUFFER_TOTAL_LENGTH_VALID
static void ioam_export_header_cleanup(ip4_address_t *collector_address, ip4_address_t *src_address)
static int ioam_export_init_buffer(vlib_main_t *vm, ioam_export_buffer_t *eb)
ethernet_main_t * ethernet_main
void vlib_buffer_free(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Free buffers Frees the entire buffer chain for each buffer.
static void clib_mem_free(void *p)
u32 vlib_buffer_alloc(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Allocate buffers into supplied array.
static u32 ipfix_set_id_length(u16 set_id, u16 length)
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
static int ioam_export_thread_buffer_init(vlib_main_t *vm)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
#define ip_csum_update(sum, old, new, type, field)
#define DEFAULT_EXPORT_SIZE
static void * clib_mem_alloc_aligned(uword size, uword align)
static void ioam_export_thread_buffer_free(void)
static int ioam_export_buffer_add_header(vlib_buffer_t *b0)
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
#define CLIB_CACHE_LINE_BYTES
u32 flags
buffer flags: VLIB_BUFFER_IS_TRACED: trace this buffer.
u32 ip4_lookup_node_index
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static u16 ip4_header_checksum(ip4_header_t *i)
static u16 ip_csum_fold(ip_csum_t c)
ioam_export_main_t ioam_export_main