Ignore:
Timestamp:
02/28/17 14:20:50 (4 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:
204d65b
Parents:
c9ce7ab (diff), db84bb2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'ringtimestampfixes' into develop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_linux_int.c

    r5e3f16c rdb84bb2  
    286286        }
    287287
     288
    288289        /* Buffer contains all of our packet (including our custom header) so
    289290         * we just need to get prepare_packet to set all our packet pointers
     
    294295                return -1;
    295296       
     297        if (hdr->timestamptype == TS_TIMEVAL) {
     298                packet->order = (((uint64_t)hdr->tv.tv_sec) << 32)
     299                            + ((((uint64_t)hdr->tv.tv_usec) << 32) /1000000);
     300        } else if (hdr->timestamptype == TS_TIMESPEC) {
     301                packet->order = (((uint64_t)hdr->ts.tv_sec) << 32)
     302                            + ((((uint64_t)hdr->ts.tv_nsec) << 32) /1000000000);
     303        } else {
     304                packet->order = 0;
     305        }
     306
     307        if (packet->order <= stream->last_timestamp) {
     308                packet->order = stream->last_timestamp + 1;
     309        }
     310
     311        stream->last_timestamp = packet->order;
     312
    296313        return hdr->wirelen+sizeof(*hdr);
    297314}
Note: See TracChangeset for help on using the changeset viewer.