The Tx queue stats loop logs an error when the queue index is out of
range, then writes q_opackets[idx] and q_obytes[idx] anyway. The Rx loop
skips the queue in this case.

Add the missing continue. Latent today since MRVL_PP2_TXQ_MAX (8) is
below RTE_ETHDEV_QUEUE_STAT_CNTRS (16), but the check is wrong.

Fixes: bdffe0c70a0b ("net/mrvl: support basic stats")
Cc: [email protected]

Signed-off-by: Stephen Hemminger <[email protected]>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 1074092d43..bc947ff52e 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -1546,6 +1546,7 @@ mrvl_stats_get(struct rte_eth_dev *dev, struct 
rte_eth_stats *stats,
                        MRVL_LOG(ERR,
                                "tx queue %d stats out of range (0 - %d)",
                                idx, RTE_ETHDEV_QUEUE_STAT_CNTRS - 1);
+                       continue;
                }
 
                ret = pp2_ppio_outq_get_statistics(priv->ppio, idx,
-- 
2.53.0

Reply via email to