From 3930d9ceaff9d0c2c86d39d52b007404f42b44b4 Mon Sep 17 00:00:00 2001 From: Xiaoyun Wang Date: Mon, 14 Sep 2020 22:31:44 +0800 Subject: [PATCH] net/hinic: fix Rx nombuf stats 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: stable@dpdk.org Signed-off-by: Xiaoyun Wang --- 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 67e6afcf7a..b2c8a5165b 100644 --- a/drivers/net/hinic/hinic_pmd_ethdev.c +++ b/drivers/net/hinic/hinic_pmd_ethdev.c @@ -1320,6 +1320,8 @@ hinic_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) 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; -- 2.20.1