I wasn’t clear enough: your proposal uses a single clock object across multiple threads. The counters returned by the x86_64 rdtsc instruction are per-core, and differ by a noticeable fraction of a second...
HTH... Dave From: [email protected] <[email protected]> On Behalf Of [email protected] Sent: Friday, April 16, 2021 4:18 AM To: [email protected] Subject: Re: [vpp-dev] Clock time in pcap Hi Dave, Thanks! for the response. My proposed changes are in pcap_add_packet, which is called from dispatch_pcap_trace and pcap_add_buffer after aquiring spin lock. So, I think it's MT-safe. Thanks, Srini
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19226): https://lists.fd.io/g/vpp-dev/message/19226 Mute This Topic: https://lists.fd.io/mt/82117060/21656 Group Owner: [email protected] Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
