Changeset 858ce90 for lib/trace.c


Ignore:
Timestamp:
02/05/15 19:39:31 (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:
12ae766
Parents:
368a1ae
Message:

Refactoring the packet loop

Removes the pread type selection function and replaces it with a
function pointer created when the format is started.

Tidies the per packet loop, removes duplicate code and rewrites
tracetime-delaying so that a message can be processed while waiting
for the delay to return within a batch of packets.

In this case if a pause message is encountered we will first
notify the trace that we are pausing. Then send any remaining
packets from the batch without delay, and then properly pause. The resume
message is sent to the per packet thread before normal packet
flow continues.

This still is WIP and contains alot of debugging code. The error
path still needs to be better implemented

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    r368a1ae r858ce90  
    282282        libtrace->dropped_packets = UINT64_MAX;
    283283        libtrace->received_packets = UINT64_MAX;
     284        libtrace->pread = NULL;
    284285        ZERO_USER_CONFIG(libtrace->config);
    285286
     
    396397        libtrace->perpkt_threads = NULL;
    397398        libtrace->tracetime = 0;
     399        libtrace->pread = NULL;
    398400        ZERO_USER_CONFIG(libtrace->config);
    399401       
Note: See TracChangeset for help on using the changeset viewer.