app/testpmd: fix packets dump overlapping
authorJiawei Wang <jiaweiw@nvidia.com>
Wed, 20 Jan 2021 06:50:17 +0000 (08:50 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 29 Jan 2021 17:16:07 +0000 (18:16 +0100)
commit2ce964954b44aa87926052a7b018605e2a19eacd
treea3c2d7b05f1455370152cced07c972c2be7ad851
parentb38480dc4e080bedbdd1ecefbdabf6c646ff72cf
app/testpmd: fix packets dump overlapping

When testpmd enabled the verbosity for the received packets, if two
packets were received at the same time, for example, sampling packet and
normal packet, the dump output of these packets may be overlapping due
to multiple core handling the multiple queues simultaneously.

The patch uses one string buffer that collects all the packet dump
output into this buffer and then printouts it at last, that guarantees
to printout separately the dump output per packet.

Fixes: d862c45b5955 ("app/testpmd: move dumping packets to a separate function")
Cc: stable@dpdk.org
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
app/test-pmd/util.c