From 254c1b0ddf8283284c538cf7d7a136001304d81b Mon Sep 17 00:00:00 2001 From: Filip Tehlar Date: Tue, 3 Sep 2019 14:21:05 +0000 Subject: dpdk: fix extended stats Extended stats are not displayed due to incorrect condition. Type: fix Change-Id: Ie04664e6274137462dce832bf7ee06204cd77be5 Signed-off-by: Filip Tehlar --- src/plugins/dpdk/device/format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/dpdk/device/format.c') diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c index d57dc34584e..942def63b0a 100644 --- a/src/plugins/dpdk/device/format.c +++ b/src/plugins/dpdk/device/format.c @@ -668,7 +668,7 @@ format_dpdk_device (u8 * s, va_list * args) vec_validate (xstat_names, len - 1); int ret = rte_eth_xstats_get_names (xd->port_id, xstat_names, len); - if (ret < 0 || ret > len) + if (ret >= 0 && ret <= len) { /* *INDENT-OFF* */ vec_foreach_index(i, xd->xstats) -- cgit 1.2.3-korg