FD.io VPP  v20.05.1-6-gf53edbc3b
Vector Packet Processing
serialize.c File Reference
+ Include dependency graph for serialize.c:

Go to the source code of this file.

Macros

#define SERIALIZE_VECTOR_CHUNK_SIZE   64
 
#define foreach_serialize_heap_header_integer   _ (head) _ (tail) _ (used_count) _ (max_len) _ (flags) _ (elt_bytes)
 

Functions

void serialize_64 (serialize_main_t *m, va_list *va)
 
void serialize_32 (serialize_main_t *m, va_list *va)
 
void serialize_16 (serialize_main_t *m, va_list *va)
 
void serialize_8 (serialize_main_t *m, va_list *va)
 
void unserialize_64 (serialize_main_t *m, va_list *va)
 
void unserialize_32 (serialize_main_t *m, va_list *va)
 
void unserialize_16 (serialize_main_t *m, va_list *va)
 
void unserialize_8 (serialize_main_t *m, va_list *va)
 
void serialize_f64 (serialize_main_t *m, va_list *va)
 
void serialize_f32 (serialize_main_t *m, va_list *va)
 
void unserialize_f64 (serialize_main_t *m, va_list *va)
 
void unserialize_f32 (serialize_main_t *m, va_list *va)
 
void serialize_cstring (serialize_main_t *m, char *s)
 
void unserialize_cstring (serialize_main_t *m, char **s)
 
void serialize_vec_8 (serialize_main_t *m, va_list *va)
 
void unserialize_vec_8 (serialize_main_t *m, va_list *va)
 
void serialize_vector (serialize_main_t *m, va_list *va)
 
void * unserialize_vector_ha (serialize_main_t *m, u32 elt_bytes, u32 header_bytes, u32 align, u32 max_length, serialize_function_t *f)
 
void unserialize_aligned_vector (serialize_main_t *m, va_list *va)
 
void unserialize_vector (serialize_main_t *m, va_list *va)
 
void serialize_bitmap (serialize_main_t *m, uword *b)
 
uwordunserialize_bitmap (serialize_main_t *m)
 
void serialize_pool (serialize_main_t *m, va_list *va)
 
static void * unserialize_pool_helper (serialize_main_t *m, u32 elt_bytes, u32 align, serialize_function_t *f)
 
void unserialize_pool (serialize_main_t *m, va_list *va)
 
void unserialize_aligned_pool (serialize_main_t *m, va_list *va)
 
static void serialize_vec_heap_elt (serialize_main_t *m, va_list *va)
 
static void unserialize_vec_heap_elt (serialize_main_t *m, va_list *va)
 
void serialize_heap (serialize_main_t *m, va_list *va)
 
void unserialize_heap (serialize_main_t *m, va_list *va)
 
void serialize_magic (serialize_main_t *m, void *magic, u32 magic_bytes)
 
void unserialize_check_magic (serialize_main_t *m, void *magic, u32 magic_bytes)
 
clib_error_tva_serialize (serialize_main_t *sm, va_list *va)
 
clib_error_tserialize (serialize_main_t *m,...)
 
clib_error_tunserialize (serialize_main_t *m,...)
 
static void * serialize_write_not_inline (serialize_main_header_t *m, serialize_stream_t *s, uword n_bytes_to_write, uword flags)
 
static void * serialize_read_not_inline (serialize_main_header_t *m, serialize_stream_t *s, uword n_bytes_to_read, uword flags)
 
void * serialize_read_write_not_inline (serialize_main_header_t *m, serialize_stream_t *s, uword n_bytes, uword flags)
 
static void serialize_read_write_close (serialize_main_header_t *m, serialize_stream_t *s, uword flags)
 
void serialize_close (serialize_main_t *m)
 
void unserialize_close (serialize_main_t *m)
 
void serialize_open_data (serialize_main_t *m, u8 *data, uword n_data_bytes)
 
void unserialize_open_data (serialize_main_t *m, u8 *data, uword n_data_bytes)
 
static void serialize_vector_write (serialize_main_header_t *m, serialize_stream_t *s)
 
void serialize_open_vector (serialize_main_t *m, u8 *vector)
 
void * serialize_close_vector (serialize_main_t *m)
 
void serialize_multiple_1 (serialize_main_t *m, void *data, uword data_stride, uword n_data)
 
void serialize_multiple_2 (serialize_main_t *m, void *data, uword data_stride, uword n_data)
 
void serialize_multiple_4 (serialize_main_t *m, void *data, uword data_stride, uword n_data)
 
void unserialize_multiple_1 (serialize_main_t *m, void *data, uword data_stride, uword n_data)
 
void unserialize_multiple_2 (serialize_main_t *m, void *data, uword data_stride, uword n_data)
 
void unserialize_multiple_4 (serialize_main_t *m, void *data, uword data_stride, uword n_data)
 
static void clib_file_write (serialize_main_header_t *m, serialize_stream_t *s)
 
static void clib_file_read (serialize_main_header_t *m, serialize_stream_t *s)
 
static void serialize_open_clib_file_descriptor_helper (serialize_main_t *m, int fd, uword is_read)
 
void serialize_open_clib_file_descriptor (serialize_main_t *m, int fd)
 
void unserialize_open_clib_file_descriptor (serialize_main_t *m, int fd)
 
static clib_error_tserialize_open_clib_file_helper (serialize_main_t *m, char *file, uword is_read)
 
clib_error_tserialize_open_clib_file (serialize_main_t *m, char *file)
 
clib_error_tunserialize_open_clib_file (serialize_main_t *m, char *file)
 

Macro Definition Documentation

◆ foreach_serialize_heap_header_integer

#define foreach_serialize_heap_header_integer   _ (head) _ (tail) _ (used_count) _ (max_len) _ (flags) _ (elt_bytes)

◆ SERIALIZE_VECTOR_CHUNK_SIZE

#define SERIALIZE_VECTOR_CHUNK_SIZE   64

Definition at line 280 of file serialize.c.

Function Documentation

◆ clib_file_read()

static void clib_file_read ( serialize_main_header_t m,
serialize_stream_t s 
)
static

Definition at line 1172 of file serialize.c.

+ Here is the call graph for this function:

◆ clib_file_write()

static void clib_file_write ( serialize_main_header_t m,
serialize_stream_t s 
)
static

Definition at line 1151 of file serialize.c.

+ Here is the call graph for this function:

◆ serialize()

clib_error_t* serialize ( serialize_main_t m,
  ... 
)

Definition at line 672 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_16()

void serialize_16 ( serialize_main_t m,
va_list *  va 
)

Definition at line 63 of file serialize.c.

+ Here is the call graph for this function:

◆ serialize_32()

void serialize_32 ( serialize_main_t m,
va_list *  va 
)

Definition at line 56 of file serialize.c.

+ Here is the call graph for this function:

◆ serialize_64()

void serialize_64 ( serialize_main_t m,
va_list *  va 
)

Definition at line 45 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_8()

void serialize_8 ( serialize_main_t m,
va_list *  va 
)

Definition at line 70 of file serialize.c.

+ Here is the call graph for this function:

◆ serialize_bitmap()

void serialize_bitmap ( serialize_main_t m,
uword b 
)

Definition at line 359 of file serialize.c.

+ Here is the call graph for this function:

◆ serialize_close()

void serialize_close ( serialize_main_t m)

Definition at line 870 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_close_vector()

void* serialize_close_vector ( serialize_main_t m)

Definition at line 919 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_cstring()

void serialize_cstring ( serialize_main_t m,
char *  s 
)

Definition at line 164 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_f32()

void serialize_f32 ( serialize_main_t m,
va_list *  va 
)

Definition at line 125 of file serialize.c.

+ Here is the call graph for this function:

◆ serialize_f64()

void serialize_f64 ( serialize_main_t m,
va_list *  va 
)

Definition at line 112 of file serialize.c.

+ Here is the call graph for this function:

◆ serialize_heap()

void serialize_heap ( serialize_main_t m,
va_list *  va 
)

Definition at line 510 of file serialize.c.

+ Here is the call graph for this function:

◆ serialize_magic()

void serialize_magic ( serialize_main_t m,
void *  magic,
u32  magic_bytes 
)

Definition at line 625 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_multiple_1()

void serialize_multiple_1 ( serialize_main_t m,
void *  data,
uword  data_stride,
uword  n_data 
)

Definition at line 934 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_multiple_2()

void serialize_multiple_2 ( serialize_main_t m,
void *  data,
uword  data_stride,
uword  n_data 
)

Definition at line 966 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_multiple_4()

void serialize_multiple_4 ( serialize_main_t m,
void *  data,
uword  data_stride,
uword  n_data 
)

Definition at line 1003 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_open_clib_file()

clib_error_t* serialize_open_clib_file ( serialize_main_t m,
char *  file 
)

Definition at line 1236 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_open_clib_file_descriptor()

void serialize_open_clib_file_descriptor ( serialize_main_t m,
int  fd 
)

Definition at line 1209 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_open_clib_file_descriptor_helper()

static void serialize_open_clib_file_descriptor_helper ( serialize_main_t m,
int  fd,
uword  is_read 
)
static

Definition at line 1192 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_open_clib_file_helper()

static clib_error_t* serialize_open_clib_file_helper ( serialize_main_t m,
char *  file,
uword  is_read 
)
static

Definition at line 1221 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_open_data()

void serialize_open_data ( serialize_main_t m,
u8 data,
uword  n_data_bytes 
)

Definition at line 883 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_open_vector()

void serialize_open_vector ( serialize_main_t m,
u8 vector 
)

Definition at line 909 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_pool()

void serialize_pool ( serialize_main_t m,
va_list *  va 
)

Definition at line 411 of file serialize.c.

+ Here is the call graph for this function:

◆ serialize_read_not_inline()

static void* serialize_read_not_inline ( serialize_main_header_t m,
serialize_stream_t s,
uword  n_bytes_to_read,
uword  flags 
)
static

Definition at line 750 of file serialize.c.

+ Here is the caller graph for this function:

◆ serialize_read_write_close()

static void serialize_read_write_close ( serialize_main_header_t m,
serialize_stream_t s,
uword  flags 
)
static

Definition at line 851 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_read_write_not_inline()

void* serialize_read_write_not_inline ( serialize_main_header_t m,
serialize_stream_t s,
uword  n_bytes,
uword  flags 
)

Definition at line 842 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_vec_8()

void serialize_vec_8 ( serialize_main_t m,
va_list *  va 
)

Definition at line 204 of file serialize.c.

+ Here is the call graph for this function:

◆ serialize_vec_heap_elt()

static void serialize_vec_heap_elt ( serialize_main_t m,
va_list *  va 
)
static

Definition at line 484 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_vector()

void serialize_vector ( serialize_main_t m,
va_list *  va 
)

Definition at line 283 of file serialize.c.

+ Here is the call graph for this function:

◆ serialize_vector_write()

static void serialize_vector_write ( serialize_main_header_t m,
serialize_stream_t s 
)
static

Definition at line 897 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize_write_not_inline()

static void* serialize_write_not_inline ( serialize_main_header_t m,
serialize_stream_t s,
uword  n_bytes_to_write,
uword  flags 
)
static

Definition at line 696 of file serialize.c.

+ Here is the caller graph for this function:

◆ unserialize()

clib_error_t* unserialize ( serialize_main_t m,
  ... 
)

Definition at line 684 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unserialize_16()

void unserialize_16 ( serialize_main_t m,
va_list *  va 
)

Definition at line 94 of file serialize.c.

+ Here is the call graph for this function:

◆ unserialize_32()

void unserialize_32 ( serialize_main_t m,
va_list *  va 
)

Definition at line 87 of file serialize.c.

+ Here is the call graph for this function:

◆ unserialize_64()

void unserialize_64 ( serialize_main_t m,
va_list *  va 
)

Definition at line 77 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unserialize_8()

void unserialize_8 ( serialize_main_t m,
va_list *  va 
)

Definition at line 103 of file serialize.c.

+ Here is the call graph for this function:

◆ unserialize_aligned_pool()

void unserialize_aligned_pool ( serialize_main_t m,
va_list *  va 
)

Definition at line 474 of file serialize.c.

+ Here is the call graph for this function:

◆ unserialize_aligned_vector()

void unserialize_aligned_vector ( serialize_main_t m,
va_list *  va 
)

Definition at line 330 of file serialize.c.

+ Here is the call graph for this function:

◆ unserialize_bitmap()

uword* unserialize_bitmap ( serialize_main_t m)

Definition at line 377 of file serialize.c.

+ Here is the call graph for this function:

◆ unserialize_check_magic()

void unserialize_check_magic ( serialize_main_t m,
void *  magic,
u32  magic_bytes 
)

Definition at line 634 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unserialize_close()

void unserialize_close ( serialize_main_t m)

Definition at line 877 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unserialize_cstring()

void unserialize_cstring ( serialize_main_t m,
char **  s 
)

Definition at line 178 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unserialize_f32()

void unserialize_f32 ( serialize_main_t m,
va_list *  va 
)

Definition at line 151 of file serialize.c.

+ Here is the call graph for this function:

◆ unserialize_f64()

void unserialize_f64 ( serialize_main_t m,
va_list *  va 
)

Definition at line 138 of file serialize.c.

+ Here is the call graph for this function:

◆ unserialize_heap()

void unserialize_heap ( serialize_main_t m,
va_list *  va 
)

Definition at line 560 of file serialize.c.

+ Here is the call graph for this function:

◆ unserialize_multiple_1()

void unserialize_multiple_1 ( serialize_main_t m,
void *  data,
uword  data_stride,
uword  n_data 
)

Definition at line 1040 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unserialize_multiple_2()

void unserialize_multiple_2 ( serialize_main_t m,
void *  data,
uword  data_stride,
uword  n_data 
)

Definition at line 1072 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unserialize_multiple_4()

void unserialize_multiple_4 ( serialize_main_t m,
void *  data,
uword  data_stride,
uword  n_data 
)

Definition at line 1109 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unserialize_open_clib_file()

clib_error_t* unserialize_open_clib_file ( serialize_main_t m,
char *  file 
)

Definition at line 1242 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unserialize_open_clib_file_descriptor()

void unserialize_open_clib_file_descriptor ( serialize_main_t m,
int  fd 
)

Definition at line 1215 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unserialize_open_data()

void unserialize_open_data ( serialize_main_t m,
u8 data,
uword  n_data_bytes 
)

Definition at line 891 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unserialize_pool()

void unserialize_pool ( serialize_main_t m,
va_list *  va 
)

Definition at line 465 of file serialize.c.

+ Here is the call graph for this function:

◆ unserialize_pool_helper()

static void* unserialize_pool_helper ( serialize_main_t m,
u32  elt_bytes,
u32  align,
serialize_function_t f 
)
static

Definition at line 434 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unserialize_vec_8()

void unserialize_vec_8 ( serialize_main_t m,
va_list *  va 
)

Definition at line 213 of file serialize.c.

+ Here is the call graph for this function:

◆ unserialize_vec_heap_elt()

static void unserialize_vec_heap_elt ( serialize_main_t m,
va_list *  va 
)
static

Definition at line 497 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unserialize_vector()

void unserialize_vector ( serialize_main_t m,
va_list *  va 
)

Definition at line 345 of file serialize.c.

+ Here is the call graph for this function:

◆ unserialize_vector_ha()

void* unserialize_vector_ha ( serialize_main_t m,
u32  elt_bytes,
u32  header_bytes,
u32  align,
u32  max_length,
serialize_function_t f 
)

Definition at line 304 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ va_serialize()

clib_error_t* va_serialize ( serialize_main_t sm,
va_list *  va 
)

Definition at line 651 of file serialize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: