Changeset 0317e3c for lib


Ignore:
Timestamp:
11/08/17 13:13:38 (3 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
cachetimestamps, develop, dpdk-ndag, etsilive, master, ndag_format, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance
Children:
4bab977
Parents:
05b65ae
Message:

Added perf boost to erf_get_padding() for ndag and rawerf formats.

The code will no longer call trace_get_link_type() for these
formats, as packet->header will always point to an ERF header
for both ndag and rawerf which we can use to find the link type
without extra function call overhead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_erf.c

    ree6e802 r0317e3c  
    126126static int erf_get_padding(const libtrace_packet_t *packet)
    127127{
    128         if (packet->trace->format->type==TRACE_FORMAT_ERF) {
     128        if (packet->trace->format->type==TRACE_FORMAT_ERF ||
     129                        packet->trace->format->type == TRACE_FORMAT_NDAG ||
     130                        packet->trace->format->type == TRACE_FORMAT_RAWERF) {
    129131                dag_record_t *erfptr = (dag_record_t *)packet->header;
    130132                switch((erfptr->type & 0x7f)) {
Note: See TracChangeset for help on using the changeset viewer.