Ignore:
Timestamp:
09/09/15 14:04:10 (6 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
a2dcdad
Parents:
0f6bc3f
Message:

Fix problems with combiners and ticks.

  • Each tick should only be passed to the reporter once at most. In the case of a sorted combiner, all ticks are discarded.
  • In the case of an ordered combiner, ticks that do not use the same ordering as packets (e.g. ts ticks vs count ticks) are not used for any ordering comparisons. A read operation will read from each queue until it encounters a tick in that queue -- if it is a new tick, that will be reported, otherwise the tick is discarded and the queue is marked as not "live".

In terms of testing: works OK when mixing timestamp ticks with non-parallel
input. Still needs to be tested the other way around.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/combiner_unordered.c

    rf01c479 r3dd5acc  
    3535                while (libtrace_deque_get_size(v) != 0) {
    3636                        libtrace_result_t r;
    37                         libtrace_generic_t gt = {.res = &r};
     37                        libtrace_generic_t gt = {.res = &r};
    3838                        ASSERT_RET (libtrace_deque_pop_front(v, (void *) &r), == 1);
     39                        /* Ignore any ticks that we've already seen */
     40                        if (r.type == RESULT_TICK_INTERVAL) {
     41                                if (r.key <= c->last_ts_tick)
     42                                        continue;
     43                                c->last_ts_tick = r.key;
     44                        }
     45
     46                        if (r.type == RESULT_TICK_COUNT) {
     47                                if (r.key <= c->last_count_tick)
     48                                        continue;
     49                                c->last_count_tick = r.key;
     50                        }
    3951                        trace->reporter(trace, MESSAGE_RESULT, gt, &trace->reporter_thread);
    4052                }
     
    6173    read,                       /* pause */
    6274    NULL,                       /* queues */
     75    0,                          /* last_count_tick */
     76    0,                          /* last_ts_tick */
    6377    {0}                         /* opts */
    6478};
Note: See TracChangeset for help on using the changeset viewer.