summaryrefslogtreecommitdiffstats
path: root/src/plugins/quic/quic.c
diff options
context:
space:
mode:
authorAloys Augustin <aloaugus@cisco.com>2019-07-12 12:16:16 +0200
committerFlorin Coras <florin.coras@gmail.com>2019-07-12 16:26:08 +0000
commita0abbff4849e8b8721b70769ae1f3ef27dd6733c (patch)
treefcd95b5b37d975db652ace3f8f7a4e18d3f0f2a9 /src/plugins/quic/quic.c
parentfe67afdd9386f09e07abfa2c1ba278f8bc549c32 (diff)
session: add thread index to all formatters
Add a thread_index argument to half-open and listener session formatters because QUIC can have listeners and half-open sessions in any thread. Change-Id: I1de60e35ece4c68ba8cfdd6b63f211bc620d687b Signed-off-by: Aloys Augustin <aloaugus@cisco.com> Type: feature
Diffstat (limited to 'src/plugins/quic/quic.c')
-rw-r--r--src/plugins/quic/quic.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/quic/quic.c b/src/plugins/quic/quic.c
index f38a7ca30a6..a96cb8546f4 100644
--- a/src/plugins/quic/quic.c
+++ b/src/plugins/quic/quic.c
@@ -1677,7 +1677,8 @@ static u8 *
format_quic_half_open (u8 * s, va_list * args)
{
u32 qc_index = va_arg (*args, u32);
- quic_ctx_t *ctx = quic_ctx_get (qc_index, vlib_get_thread_index ());
+ u32 thread_index = va_arg (*args, u32);
+ quic_ctx_t *ctx = quic_ctx_get (qc_index, thread_index);
s = format (s, "[QUIC] half-open app %u", ctx->parent_app_id);
return s;
}
@@ -1687,8 +1688,9 @@ static u8 *
format_quic_listener (u8 * s, va_list * args)
{
u32 tci = va_arg (*args, u32);
+ u32 thread_index = va_arg (*args, u32);
u32 verbose = va_arg (*args, u32);
- quic_ctx_t *ctx = quic_ctx_get (tci, vlib_get_thread_index ());
+ quic_ctx_t *ctx = quic_ctx_get (tci, thread_index);
if (ctx)
{
ASSERT (quic_ctx_is_listener (ctx));