Changeset a978dec


Ignore:
Timestamp:
03/16/15 13:10:52 (6 years ago)
Author:
Richard Sanger <rsangerarj@…>
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:
e3d534f
Parents:
6a6e6a8
Message:

Fix bugs with resuming int/ring formats

Fix int/ring reset statistics on resume.
Fix ring was not zeroing the offset before restarting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_linux_common.c

    r526d9d0 ra978dec  
    226226                       stream->req.tp_block_nr);
    227227        stream->rx_ring = MAP_FAILED;
     228        stream->rxring_offset = 0;
    228229        FORMAT_DATA->dev_stats.if_name[0] = 0;
    229230}
     
    424425        /* Mark that the stats are valid and apply an offset */
    425426        FORMAT_DATA->stats_valid = 1;
    426         /* Offset by number we ate for each stream */
    427         FORMAT_DATA->stats.tp_packets -= count;
    428 
     427        /* Offset by number we ate for each stream and reset stats after pause */
     428        FORMAT_DATA->stats.tp_packets = -count;
     429        FORMAT_DATA->stats.tp_drops = 0;
    429430
    430431        if (linuxcommon_get_dev_statisitics(libtrace, &FORMAT_DATA->dev_stats) != 0) {
Note: See TracChangeset for help on using the changeset viewer.