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

Message ID 20200122175514.26213-2-stephen@networkplumber.org (mailing list archive)
State Accepted, archived
Delegated to: Ajit Khaparde
Headers
Series net/bnxt: statistic related fixes |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation 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 --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);