net/bnxt: do not log error if stats queried before start
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 22 Jan 2020 17:55:13 +0000 (09:55 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 5 Feb 2020 08:51:19 +0000 (09:51 +0100)
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 <stephen@networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_stats.c

index 20a16a6..65f90e0 100644 (file)
@@ -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);