Changeset ee58d0d for lib/libtrace.h.in


Ignore:
Timestamp:
08/12/11 14:22:16 (10 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, 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:
c29a0e0
Parents:
44028d4
Message:
  • Improved performance by caching more stuff, especially L2 headers and various "remaining" values - not much point caching something if you need to re-read the entire packet to calculate "remaining" still :)
  • Also improved performance of trace_get_layer2 by avoiding an effective double call of trace_get_packet_buffer
  • Fixed bug with payload length calculation if the packet has extra padding beyond what the IP len states
  • Improved (hopefully) performance when reading ERF traces by avoiding updating the drops counter if the loss counter was zero (should save an ntohs at least)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h.in

    r9ca0b29 ree58d0d  
    421421        int capture_length;             /**< Cached capture length */
    422422        int payload_length;             /**< Cached payload length */
     423        void *l2_header;                /**< Cached link header */
     424        libtrace_linktype_t link_type;  /**< Cached link type */
     425        uint32_t l2_remaining;          /**< Cached link remaining */
    423426        void *l3_header;                /**< Cached l3 header */
    424427        uint16_t l3_ethertype;          /**< Cached l3 ethertype */
     428        uint32_t l3_remaining;          /**< Cached l3 remaining */
    425429        void *l4_header;                /**< Cached transport header */
    426430        uint8_t transport_proto;        /**< Cached transport protocol */
     431        uint32_t l4_remaining;          /**< Cached transport remaining */
    427432} libtrace_packet_t;
    428433
Note: See TracChangeset for help on using the changeset viewer.