Timestamp:
09/14/15 11:25:29 (7 years ago)
Author:
Shane Alcock <salcock@…>
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:
a6b44a7
Parents:
322c516
Message:

Don't rely on rlen for determining write sizes for ERF packets

Sometimes rlen is greater than the capture + framing length for a packet, e.g.
in cases where the wlen is less than the rlen. Basing our arithmetic off
rlen can mean that we try to write too much data (especially if the packet
buffer has been sized to perfectly fit the packet according to
trace_get_capture_length and trace_get_framing_length). This will happen
if the ERF packets have been received via RT, for instance.

Also replace use of "dag_record_size + pad" with trace_get_framing_length() in
the same arithmetic, so that our write sizes are correct in the presence of
ERF extension headers.

(No files)

Note: See TracChangeset for help on using the changeset viewer.