Changeset c70f59f for lib/format_dag25.c


Ignore:
Timestamp:
08/25/14 11:33:39 (7 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:
7fda5c5
Parents:
a79eae41
Message:

Don't increment accepted_packets in trace_event

For formats that use the normal trace_event_device and
trace_event_trace functions to implement trace_event functionality,
this was resulting in accepted_packets being incremented twice:
once in the call to trace_read_packet within the standard event
function and once again in trace_event.

Removed the increment from trace_event and updated all formats
that provide a custom trace_event implementation to make sure they
either call trace_read_packet themselves or update the counters
properly (with the former preferred wherever possible).

Thanks to Alistair King for finding this bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_dag25.c

    rc909fad rc70f59f  
    11341134                                 * a sleep event in this case, like we used to
    11351135                                 * do! */
     1136                                trace->filtered_packets ++;
    11361137                                trace_clear_cache(packet);
    11371138                                continue;
     
    11441145                        trace_set_capture_length(packet, trace->snaplen);
    11451146                }
     1147                trace->accepted_packets ++;
    11461148                break;
    11471149        } while (1);
Note: See TracChangeset for help on using the changeset viewer.