Changeset d7fd648 for lib/libtrace_int.h


Ignore:
Timestamp:
12/19/14 15:47:34 (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:
1960910
Parents:
6e41e73
Message:

Improves speed of the DPDK format(and parallel libtrace) and fixes some DPDK bugs

Fixes bug with PCI address being parsed as a decimal instead of hex.
Fixes bug so DPDK Breaks out of loop when libtrace_halt is called

For performance

  • Rearranges the header format used to simplify code which might show a small speed up
  • Batching packets is now supported thoughout the parallel framework
  • DPDK now always reads packets in bursts if possible, including in single threaded mode
  • Calls to retrive system time only needs to occur once for a batch of packets
  • The CPU core used to run DPDK is/are now picked based upon the NUMA node the NIC is attached to
  • A delay has been added to reduce the memory load of polling after unsuccessful attempts this tends to improve performance
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace_int.h

    rd994324 rd7fd648  
    893893        int (*pstart_input)(libtrace_t *trace);
    894894       
    895         /** Read a packet in the new parallel mode
    896          * @return same as read_packet, with the addition of return -2 to represent
    897          * interrupted due to message waiting. */
    898         int (*pread_packet)(libtrace_t *trace, libtrace_thread_t *t, libtrace_packet_t *packet);
     895        /**
     896         * Read a batch of packets from the input stream related to thread.
     897         * At most read nb_packets, however should return with less if packets
     898         * are not waiting. However still must return at least 1, 0 still indicates
     899         * EOF.
     900         *
     901         * @param libtrace      The input trace
     902         * @param t     The thread
     903         * @param packets       An array of packets
     904         * @param nb_packets    The number of packets in the array (the maximum to read)
     905         * @return The number of packets read, or 0 in the case of EOF or -1 in error or -2 to represent
     906         * interrupted due to message waiting before packets had been read.
     907         */
     908        int (*pread_packets)(libtrace_t *trace, libtrace_thread_t *t, libtrace_packet_t **packets, size_t nb_packets);
    899909       
    900910        /** Pause a parallel trace
     
    905915       
    906916        /** Called after all threads have been paused, Finish (close) a parallel trace
    907      *
     917         *
    908918         * @param libtrace      The input trace to be stopped
    909919         */
     
    964974 * immediately
    965975 */
    966 extern int libtrace_halt;
     976extern volatile int libtrace_halt;
    967977
    968978/** Registers a new capture format module.
Note: See TracChangeset for help on using the changeset viewer.