]> git.droids-corp.org - dpdk.git/commit
app/testpmd: check statistics query before printing
authorMin Hu (Connor) <humin29@huawei.com>
Wed, 6 Apr 2022 08:45:36 +0000 (16:45 +0800)
committerFerruh Yigit <ferruh.yigit@xilinx.com>
Thu, 12 May 2022 16:29:04 +0000 (18:29 +0200)
commitbaef6bbfad1b9596c7051f5c1fcc308310296342
tree9a902bdb754b1d516607040af8e003c624480c35
parentec1691494273ef4f9cb60ed24099196de1ce0cc4
app/testpmd: check statistics query before printing

In function 'fwd_stats_display', if function 'rte_eth_stats_get' fails,
'stats' is uncertainty value. The display result will be abnormal.

This patch check the return value of 'rte_eth_stats_get' to avoid
display abnormal stats.

Fixes: 53324971a14e ("app/testpmd: display/clear forwarding stats on demand")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
app/test-pmd/config.c
app/test-pmd/testpmd.c