Ignore:
Timestamp:
02/19/15 13:05:59 (7 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:
694823f
Parents:
5ab626a
Message:

Move the ring sizes to the stream structures, it's possible rings could end up different sizes.
Other than that their are many operation related to reading packets which rely upon it and
it seems more natural to include this against the stream.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_linux_common.c

    r5ab626a re4f27d1  
    221221                close(stream->fd);
    222222        stream->fd = -1;
    223         /* TODO maybe store size against stream XXX */
    224223        if (stream->rx_ring != MAP_FAILED)
    225224                munmap(stream->rx_ring,
    226                        FORMAT_DATA->req.tp_block_size *
    227                        FORMAT_DATA->req.tp_block_nr);
     225                       stream->req.tp_block_size *
     226                       stream->req.tp_block_nr);
    228227        stream->rx_ring = MAP_FAILED;
    229228        FORMAT_DATA->dev_stats.if_name[0] = 0;
     
    422421                   MSG_DONTWAIT) != -1) { count++; }
    423422        free(buf);
    424         fprintf(stderr, "set offset %d", count);
    425423
    426424        /* Mark that the stats are valid and apply an offset */
     
    493491                                 libtrace_thread_t *t,
    494492                                 bool reading) {
    495         fprintf(stderr, "registering thread %d!!\n", t->perpkt_num);
    496493        if (reading) {
    497494                /* XXX TODO remove this oneday make sure hasher thread still works */
Note: See TracChangeset for help on using the changeset viewer.