From: Xiaoyun Wang Date: Mon, 14 Sep 2020 14:31:44 +0000 (+0800) Subject: net/hinic: fix Rx nombuf stats X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3930d9ceaff9d0c2c86d39d52b007404f42b44b4;p=dpdk.git 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 --- 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;