- /* Yes, but not the very first time... (;-)... */
- if (my_record_index)
- return _clib_maplog_get_entry_slowpath (mm, my_record_index);
+ /* Regular log? Switch file... */
+ if (!(mm->flags & CLIB_MAPLOG_FLAG_CIRCULAR))
+ {
+ /* Yes, but not the very first time... (;-)... */
+ if (my_record_index)
+ return _clib_maplog_get_entry_slowpath (mm, my_record_index);
+ }
+ else /* Circular log: set the wrap bit and move along */
+ mm->flags |= CLIB_MAPLOG_FLAG_WRAPPED;