[dpdk-dev] [PATCH 07/13] pcap: fix timestamps in output pcap file
Michał Mirosław
mirq-linux at rere.qmqm.pl
Tue Dec 13 02:08:17 CET 2016
From: Piotr Bartosiewicz <piotr.bartosiewicz at atendesoftware.pl>
Signed-off-by: Michał Mirosław <michal.miroslaw at atendesoftware.pl>
---
drivers/net/pcap/rte_eth_pcap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 0162f44..57b0b31 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -247,7 +247,7 @@ calculate_timestamp(struct timeval *ts) {
cycles = rte_get_timer_cycles() - start_cycles;
cur_time.tv_sec = cycles / hz;
- cur_time.tv_usec = (cycles % hz) * 10e6 / hz;
+ cur_time.tv_usec = (cycles % hz) * 1e6 / hz;
timeradd(&start_time, &cur_time, ts);
}
--
2.10.2
More information about the dev
mailing list