From d21e0fcc07cdecaaa177f21941bce5be4d333f67 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 22 Jan 2020 09:55:13 -0800 Subject: [PATCH] net/bnxt: do not log error if stats queried before start When using pktgen lots of unnecessary errors are printed because pktgen queries statistics before device is started. Fixes: 3e92fd4e4ec0 ("net/bnxt: use dynamic log type") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_stats.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c index 20a16a629f..65f90e0d85 100644 --- a/drivers/net/bnxt/bnxt_stats.c +++ b/drivers/net/bnxt/bnxt_stats.c @@ -390,10 +390,8 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev, return rc; memset(bnxt_stats, 0, sizeof(*bnxt_stats)); - if (!(bp->flags & BNXT_FLAG_INIT_DONE)) { - PMD_DRV_LOG(ERR, "Device Initialization not complete!\n"); + if (!(bp->flags & BNXT_FLAG_INIT_DONE)) return -EIO; - } num_q_stats = RTE_MIN(bp->rx_cp_nr_rings, (unsigned int)RTE_ETHDEV_QUEUE_STAT_CNTRS); -- 2.20.1