Changeset 7fda5c5


Ignore:
Timestamp:
08/25/14 11:59:54 (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:
354e54a
Parents:
c70f59f
Message:

Fix bogus filtered packet calc for BPF format

This was essentially counting filtered packets twice,
first by deducting accepted from received, then adding on
the local filtered counter.

Since BPF doesn't do any in-kernel filtering, all we actually
need is libtrace's filtered counter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    rc70f59f r7fda5c5  
    18181818                        trace->filtered_packets;
    18191819        }
    1820         if (trace->format->get_received_packets
    1821                 && trace->format->get_dropped_packets) {
    1822                 return
    1823                         ((trace_get_received_packets(trace)
    1824                         -trace_get_accepted_packets(trace))
    1825                         -trace_get_dropped_packets(trace))
    1826                         +trace->filtered_packets;
    1827         }
    18281820        return trace->filtered_packets;
    18291821}
Note: See TracChangeset for help on using the changeset viewer.