FD.io VPP  v18.01.2-1-g9b554f3
Vector Packet Processing
maplog.c File Reference
+ Include dependency graph for maplog.c:

Go to the source code of this file.

Functions

int clib_maplog_init (clib_maplog_init_args_t *a)
 Initialize a maplog object. More...
 
void clib_maplog_update_header (clib_maplog_main_t *mm)
 Update a mapped log header file. More...
 
void clib_maplog_close (clib_maplog_main_t *mm)
 Close a mapped log, and update the log header file. More...
 
u8format_maplog_header (u8 *s, va_list *args)
 format a log header More...
 
int clib_maplog_process (char *file_basename, void *fp_arg)
 Process a complete maplog. More...
 

Function Documentation

void clib_maplog_close ( clib_maplog_main_t mm)

Close a mapped log, and update the log header file.

Unmap the current log segments. Read the log header. Update the number of records, and number of files

Parameters

Definition at line 285 of file maplog.c.

+ Here is the call graph for this function:

int clib_maplog_init ( clib_maplog_init_args_t a)

Initialize a maplog object.

Compute record and file size parameters Create and map two log segments to seed the process

Parameters

Definition at line 28 of file maplog.c.

+ Here is the call graph for this function:

int clib_maplog_process ( char *  file_basename,
void *  fp_arg 
)

Process a complete maplog.

Reads the maplog header. Map and process all log segments in order. Calls the callback function once per file with a record count.

Note: if the file header isn't updated by calling clib_maplog_close(), it will appear to have an infinite number of records in an infinite number of files.

So long as the callback function understands that possibility

  • by simply ignoring NULL records - the scheme still works...
Parameters
[in]file_basenameSame basename supplied to clib_maplog_init
[in]fp_argCallback function pointer

Definition at line 366 of file maplog.c.

+ Here is the call graph for this function:

void clib_maplog_update_header ( clib_maplog_main_t mm)

Update a mapped log header file.

Read the log header. Update the number of records, and number of files

Parameters

Definition at line 233 of file maplog.c.

+ Here is the caller graph for this function:

u8* format_maplog_header ( u8 s,
va_list *  args 
)

format a log header

Usage: s = format (0, "%U", format_maplog_header(), headerp, verbose);

Parameters
[in]hclib_maplog_header_t pointer
[in]verboseself-explanatory

Definition at line 319 of file maplog.c.

+ Here is the call graph for this function: