Changeset db84bb2 for lib/format_dpdk.c


Ignore:
Timestamp:
02/28/17 13:49:40 (4 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, master, ndag_format, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
6fb691b, 9d29d1e
Parents:
dea08f1
Message:

Ensure packet->order is always strictly incrementing

We cannot equate timestamp with packet->order, as some timestamp
methods are not strictly monotonic (ring: and int:).

Each format is now responsible for determining packet->order
during pread, so that the format can detect and correct such
inaccuracies.

More specifically, ring: and int: will cache the last reported
timestamp per thread and if time goes backwards, the order will
be set to last+1, otherwise the timestamp will be used.

DAG and DPDK still use the timestamp for ordering, since there
have been no issues with the timestamp ordering for these formats
(thus far!).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_dpdk.c

    r174b3c7 rdb84bb2  
    21542154        int i;
    21552155        dpdk_per_stream_t *stream = t->format_data;
     2156        struct dpdk_addt_hdr * hdr;
    21562157
    21572158        nb_rx = dpdk_read_packet_stream (libtrace, stream, &t->messages,
     
    21702171                        packets[i]->trace = libtrace;
    21712172                        packets[i]->error = 1;
     2173                        hdr = (struct dpdk_addt_hdr *)
     2174                                        ((struct rte_mbuf*) pkts_burst[i] + 1);
     2175                        packets[i]->order = hdr->timestamp;
    21722176                        dpdk_prepare_packet(libtrace, packets[i], packets[i]->buffer, packets[i]->type, 0);
    21732177                }
Note: See TracChangeset for help on using the changeset viewer.