src/dpdk/drivers/net/hinic/hinic_pmd_ethdev.c
static int hinic_dev_stats_reset(struct rte_eth_dev *dev)
{
	int qid;
	struct hinic_rxq	*rxq = NULL;
	struct hinic_txq	*txq = NULL;
	struct hinic_nic_dev *nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);
	int ret;

	ret = hinic_clear_vport_stats(nic_dev->hwdev);
	if (ret != 0)
		return ret;

	for (qid = 0; qid < nic_dev->num_rq; qid++) {
		rxq = nic_dev->rxqs[qid];
		hinic_rxq_stats_reset(rxq);
	}

	for (qid = 0; qid < nic_dev->num_sq; qid++) {
		txq = nic_dev->txqs[qid];
		hinic_txq_stats_reset(txq);
	}

	return 0;
}
/**
 * DPDK callback to clear device statistics.
 *
 * @param dev
 *   Pointer to Ethernet device structure.
 */
DPDK callback to clear device statistics.
@param dev
Pointer to Ethernet device structure.
DPDK callback to clear device statistics . @param dev Pointer to Ethernet device structure .
static int hinic_dev_stats_reset(struct rte_eth_dev *dev)
{
	int qid;
	struct hinic_rxq	*rxq = NULL;
	struct hinic_txq	*txq = NULL;
	struct hinic_nic_dev *nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);
	int ret;
	ret = hinic_clear_vport_stats(nic_dev->hwdev);
	if (ret != 0)
		return ret;
	for (qid = 0; qid < nic_dev->num_rq; qid++) {
		rxq = nic_dev->rxqs[qid];
		hinic_rxq_stats_reset(rxq);
	}
	for (qid = 0; qid < nic_dev->num_sq; qid++) {
		txq = nic_dev->txqs[qid];
		hinic_txq_stats_reset(txq);
	}
	return 0;
}
static int hinic_dev_stats_reset ( struct rte_eth_dev * dev ) { int qid ; struct hinic_rxq * rxq = NULL ; struct hinic_txq * txq = NULL ; struct hinic_nic_dev * nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV ( dev ) ; int ret ; ret = hinic_clear_vport_stats ( nic_dev -> hwdev ) ; if ( ret != 0 ) return ret ; for ( qid = 0 ; qid < nic_dev -> num_rq ; qid ++ ) { rxq = nic_dev -> rxqs [ qid ] ; hinic_rxq_stats_reset ( rxq ) ; } for ( qid = 0 ; qid < nic_dev -> num_sq ; qid ++ ) { txq = nic_dev -> txqs [ qid ] ; hinic_txq_stats_reset ( txq ) ; } return 0 ; }
DPDK callback to clear device statistics.
DPDK callback to clear device statistics .