Skip to content

Commit

Permalink
net/bnxt: do not log error if stats queried before start
Browse files Browse the repository at this point in the history
[ upstream commit d21e0fc ]

When using pktgen lots of unnecessary errors are printed
because pktgen queries statistics before device is started.

Fixes: 3e92fd4 ("net/bnxt: use dynamic log type")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
  • Loading branch information
shemminger authored and kevintraynor committed Feb 14, 2020
1 parent 925656b commit 35b43f2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/bnxt/bnxt_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,8 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
unsigned int num_q_stats;

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);
Expand Down

0 comments on commit 35b43f2

Please sign in to comment.