aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_funcs.h
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2022-02-23 15:35:35 +0100
committerDave Wallace <dwallacelf@gmail.com>2022-03-03 20:43:54 +0000
commitc8f7fd13676697871441a6f539907e385f994c25 (patch)
tree5963d59f3e171f11f3a2dc7f3e8eed6a15fdda19 /src/vnet/interface_funcs.h
parent54223ee25756faa0ced82c5bcb9a8ac633ccdbd8 (diff)
vnet: use system time for pcap trace
Use system wall-clock time for packets timestamps instead of the time since VPP started for pcap traces. Type: improvement Change-Id: I716165912efe8db3a8861d5c10597dc7629d2293 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/vnet/interface_funcs.h')
-rw-r--r--src/vnet/interface_funcs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vnet/interface_funcs.h b/src/vnet/interface_funcs.h
index 5434542cd7c..02d80996a15 100644
--- a/src/vnet/interface_funcs.h
+++ b/src/vnet/interface_funcs.h
@@ -546,6 +546,7 @@ pcap_add_buffer (pcap_main_t *pm, struct vlib_main_t *vm, u32 buffer_index,
if (PREDICT_TRUE (pm->n_packets_captured < pm->n_packets_to_capture))
{
+ time_now += vm->clib_time.init_reference_time;
clib_spinlock_lock_if_init (&pm->lock);
d = pcap_add_packet (pm, time_now, n_left, n);
while (1)