struct bnxt *bp = eth_dev->data->dev_private;
memset(bnxt_stats, 0, sizeof(*bnxt_stats));
+ if (!(bp->flags & BNXT_FLAG_INIT_DONE)) {
+ PMD_DRV_LOG(ERR, "Device Initialization not complete!\n");
+ return 0;
+ }
for (i = 0; i < bp->rx_cp_nr_rings; i++) {
struct bnxt_rx_queue *rxq = bp->rx_queues[i];
{
struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
+ if (!(bp->flags & BNXT_FLAG_INIT_DONE)) {
+ PMD_DRV_LOG(ERR, "Device Initialization not complete!\n");
+ return;
+ }
+
bnxt_clear_all_hwrm_stat_ctxs(bp);
rte_atomic64_clear(&bp->rx_mbuf_alloc_fail);
}
uint64_t tx_drop_pkts;
if (!(bp->flags & BNXT_FLAG_PORT_STATS)) {
- RTE_LOG(ERR, PMD, "xstats not supported for VF\n");
+ PMD_DRV_LOG(ERR, "xstats not supported for VF\n");
return 0;
}
bnxt_hwrm_port_clr_stats(bp);
if (BNXT_VF(bp))
- RTE_LOG(ERR, PMD, "Operation not supported on a VF device\n");
+ PMD_DRV_LOG(ERR, "Operation not supported on a VF device\n");
if (!BNXT_SINGLE_PF(bp))
- RTE_LOG(ERR, PMD, "Operation not supported on a MF device\n");
+ PMD_DRV_LOG(ERR, "Operation not supported on a MF device\n");
if (!(bp->flags & BNXT_FLAG_PORT_STATS))
- RTE_LOG(ERR, PMD, "Operation not supported\n");
+ PMD_DRV_LOG(ERR, "Operation not supported\n");
}
int bnxt_dev_xstats_get_by_id_op(struct rte_eth_dev *dev, const uint64_t *ids,
bnxt_dev_xstats_get_by_id_op(dev, NULL, values_copy, stat_cnt);
for (i = 0; i < limit; i++) {
if (ids[i] >= stat_cnt) {
- RTE_LOG(ERR, PMD, "id value isn't valid");
+ PMD_DRV_LOG(ERR, "id value isn't valid");
return -1;
}
values[i] = values_copy[ids[i]];
for (i = 0; i < limit; i++) {
if (ids[i] >= stat_cnt) {
- RTE_LOG(ERR, PMD, "id value isn't valid");
+ PMD_DRV_LOG(ERR, "id value isn't valid");
return -1;
}
strcpy(xstats_names[i].name,