[1/2] net/bnxt: do not print error if stats queried before start
diff mbox series

Message ID 20200122175514.26213-2-stephen@networkplumber.org
State Accepted
Delegated to: Ajit Khaparde
Headers show
Series
  • net/bnxt: statistic related fixes
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Jan. 22, 2020, 5:55 p.m. UTC
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: ajit.khaparde@broadcom.com
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/bnxt/bnxt_stats.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index 20a16a629fb5..65f90e0d8588 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);