rx_mbuf_alloc_failed value is not set to 0 when get stats from driver,
which may cause this counter added every time when call this ops.
Fixes: cb7b6606ebff ("net/hinic: add RSS stats and promiscuous ops")
Cc: [email protected]
Signed-off-by: Xiaoyun wang <[email protected]>
---
drivers/net/hinic/hinic_pmd_ethdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c
b/drivers/net/hinic/hinic_pmd_ethdev.c
index 67e6afc..b2c8a51 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -1320,6 +1320,8 @@ static int hinic_set_dev_promiscuous(struct hinic_nic_dev
*nic_dev, bool enable)
return err;
}
+ dev->data->rx_mbuf_alloc_failed = 0;
+
/* rx queue stats */
q_num = (nic_dev->num_rq < RTE_ETHDEV_QUEUE_STAT_CNTRS) ?
nic_dev->num_rq : RTE_ETHDEV_QUEUE_STAT_CNTRS;
--
1.8.3.1