aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/quic/quic.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-05-20 14:01:11 -0700
committerDamjan Marion <dmarion@me.com>2021-05-21 06:57:03 +0000
commit01314771535ca46fdf4a07a7dcde67bb8b30e024 (patch)
treed03a234236906e825dc41461ed3622341ba37d46 /src/plugins/quic/quic.c
parent22a55e679092ab1eba53d9c743cabc8368fbc880 (diff)
quic: fix timer update
Use ctx timer wheel not current thread since connects are done on main but the ctx is allocated on first worker. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibed371bed12970d0d1ae4572f36df0bb1fb70b0f
Diffstat (limited to 'src/plugins/quic/quic.c')
-rw-r--r--src/plugins/quic/quic.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/quic/quic.c b/src/plugins/quic/quic.c
index 3223e479461..c4ef4598c10 100644
--- a/src/plugins/quic/quic.c
+++ b/src/plugins/quic/quic.c
@@ -1149,7 +1149,9 @@ quic_update_timer (quic_ctx_t * ctx)
}
}
- tw = &quic_main.wrk_ctx[vlib_get_thread_index ()].timer_wheel;
+ ASSERT (vlib_get_thread_index () == ctx->c_thread_index ||
+ vlib_get_thread_index () == 0);
+ tw = &quic_main.wrk_ctx[ctx->c_thread_index].timer_wheel;
QUIC_DBG (4, "Timer set to %ld (int %ld) for ctx %u", next_timeout,
next_interval, ctx->c_c_index);