vppapitrace: Fixed trace dump API result issue. 32/40332/5
authorDenys Haryachyy <garyachy@gmail.com>
Wed, 7 Feb 2024 14:47:20 +0000 (16:47 +0200)
committerDave Barach <vpp@barachs.net>
Fri, 16 Feb 2024 15:29:07 +0000 (15:29 +0000)
Set last thread id and last packet position in TRACE_DUMP_REPLY.
To enable collection of traces from multiple workers using iterator.

Type: fix

Change-Id: I69872af4f6981d50cd050fa3d16de2a3c0d6b496
Signed-off-by: Denys Haryachyy <garyachy@gmail.com>
src/plugins/tracedump/tracedump.c

index 6510a94..08d338b 100644 (file)
@@ -288,9 +288,9 @@ vl_api_trace_dump_t_handler (vl_api_trace_dump_t * mp)
            {
              /* More threads, but not more in this thread? */
              if (j == (vec_len (client_trace_cache[i]) - 1))
-               dmp->more_threads = 1;
+               last_more_threads = dmp->more_threads = 1;
              else
-               dmp->more_this_thread = 1;
+               last_more_this_thread = dmp->more_this_thread = 1;
            }
          /* Done, may or may not be at the end of a batch. */
          dmp->done = 0;