fastclick icon indicating copy to clipboard operation
fastclick copied to clipboard

SetTimestampDelta overflow issue?

Open tbarbette opened this issue 10 months ago • 4 comments

When transforming a trace, I have observed that SetTimestampDelta messes up the timing using a pcap with nano timestamp.

https://github.com/tbarbette/fastclick/blob/e5260ccffd4822bb3e21208c029d3504abf5b342/elements/analysis/settimestampdelta.cc#L61

One should create test cases and try to reproduce, then fix :) Good first issue !

tbarbette avatar Apr 23 '25 09:04 tbarbette

Can I work on this ?

XueSongTap avatar Apr 23 '25 14:04 XueSongTap

I would be happy if you do :)

tbarbette avatar Apr 23 '25 14:04 tbarbette

Hi, @tbarbette

I tried crafting a nano‑timestamp PCAP with several 1 ns‑spaced packets. With the current code I only see all nanos being cut to µs (so every delta prints 0).

The bit that feels suspicious is the plain tv -= _first; line in SetTimestampDelta: when the underlying Timestamp is micro‑second‑based, any nano input has already been flattened before this subtraction.

Does that match what you’re seeing, or is there another code path that actually scrambles the order/values?

Thanks.

XueSongTap avatar May 02 '25 17:05 XueSongTap

There's a configure option, --enable-nanotimestamp, is that activated?

tbarbette avatar May 12 '25 14:05 tbarbette