diff options
author | Florin Coras <fcoras@cisco.com> | 2020-05-14 00:30:18 +0000 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2020-05-18 16:43:50 +0000 |
commit | b5898d2f77a0451c506b10a3a4885e974ef418a1 (patch) | |
tree | 3f1fe8958a9cefb504a74af9032da6545eda1c36 /src/vnet | |
parent | 8337806b5f03b6603a0e24ae7971672e1a7476ab (diff) |
tcp: fix bogus time update due to missing cast
Type: fix
Ticket: VPP-1874
Seems clang needs explicit casting to u64 of u64 and f64 multiplication
before truncating to u32
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib0d7a33d4c5e68577e401e854fc3e55e0723da93
(cherry picked from commit 17b5c3d6ab83a597e7c79613041f2fd7470825bd)
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/tcp/tcp_inlines.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp_inlines.h b/src/vnet/tcp/tcp_inlines.h index cb18860b1b1..c4b155aa499 100644 --- a/src/vnet/tcp/tcp_inlines.h +++ b/src/vnet/tcp/tcp_inlines.h @@ -218,7 +218,8 @@ tcp_time_now_us (u32 thread_index) always_inline u32 tcp_set_time_now (tcp_worker_ctx_t * wrk) { - wrk->time_now = clib_cpu_time_now () * tcp_main.tstamp_ticks_per_clock; + tcp_main_t *tm = &tcp_main; + wrk->time_now = (u64) (clib_cpu_time_now () * tm->tstamp_ticks_per_clock); return wrk->time_now; } |