src/stx/stl/trex_stl_stream_vm.h
static inline 
uint64_t inc_mod(uint64_t a, uint64_t b, uint64_t c, uint64_t step) {
    /* check if we have enough left for simple inc */
    uint64_t left = b - c;
    if (step <= left) {
        return (c + step);
    } else {
        return (a + (step - left - 1)); // restart consumes also 1
    }
}
/**
 * two functions ahead are used by both control plane and 
 * dataplane to allow fast inc/dec and handle overflow 
 *  
 * a - low bound 
 * b - high bound 
 * c - current value 
 * step - how many to advance / go back 
 */
two functions ahead are used by both control plane and
dataplane to allow fast inc/dec and handle overflow

low bound
b - high bound
c - current value
step - how many to advance / go back
two functions ahead are used by both control plane and dataplane to allow fast inc / dec and handle overflow low bound b - high bound c - current value step - how many to advance / go back
static inline 
uint64_t inc_mod(uint64_t a, uint64_t b, uint64_t c, uint64_t step) {
    uint64_t left = b - c;
    if (step <= left) {
        return (c + step);
    } else {
        return (a + (step - left - 1)); 
    }
}
static inline uint64_t inc_mod ( uint64_t a , uint64_t b , uint64_t c , uint64_t step ) { uint64_t left = b - c ; if ( step <= left ) { return ( c + step ) ; } else { return ( a + ( step - left - 1 ) ) ; } }
two functions ahead are used by both control plane and
 dataplane to allow fast inc/dec and handle overflow
two functions ahead are used by both control plane and dataplane to allow fast inc / dec and handle overflow
/* check if we have enough left for simple inc */ // restart consumes also 1