misc: fix tracedump API to match CLI behavior 24/38624/6
authorMaxime Peim <mpeim@cisco.com>
Tue, 11 Apr 2023 15:45:59 +0000 (15:45 +0000)
committerBeno�t Ganne <bganne@cisco.com>
Tue, 23 May 2023 11:40:29 +0000 (11:40 +0000)
commit02063b985ac2fd3ce24a42fe9e27f434ea088053
tree601ee00fac0d921105d9e190ec19efa4745ffc42
parenteed42b0efa576a6a0efa93df7c3e96ce3296f7af
misc: fix tracedump API to match CLI behavior

When dumping packets from multiple threads using the API, first all
packets from thread 0 are dumped then all ones from thread 1, etc
Until we reach the limit specified by the API call, so we could never
get packets trace from threads with higher ids.
However, the tracedump CLI dump a maximum number of packets from all
threads, which we can expect from the API to do.

We also add a trace_clear_cache API so the client gets an answer when
he only wants to clear its packet cache.

Type: improvement
Change-Id: I0d4df8f6210a298ac3f22cd651eb4d8f445e1034
Signed-off-by: Maxime Peim <mpeim@cisco.com>
src/plugins/tracedump/tracedump.api
src/plugins/tracedump/tracedump.c
src/plugins/tracedump/tracedump_test.c