src/dpdk/drivers/net/hinic/hinic_pmd_ethdev.c
static int hinic_dev_xstats_reset(struct rte_eth_dev *dev)
{
	struct hinic_nic_dev *nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);
	int ret;

	ret = hinic_dev_stats_reset(dev);
	if (ret != 0)
		return ret;

	if (hinic_func_type(nic_dev->hwdev) != TYPE_VF) {
		ret = hinic_clear_phy_port_stats(nic_dev->hwdev);
		if (ret != 0)
			return ret;
	}

	return 0;
}
/**
 * DPDK callback to clear device extended statistics.
 *
 * @param dev
 *   Pointer to Ethernet device structure.
 */
DPDK callback to clear device extended statistics.
@param dev
Pointer to Ethernet device structure.
DPDK callback to clear device extended statistics . @param dev Pointer to Ethernet device structure .
static int hinic_dev_xstats_reset(struct rte_eth_dev *dev)
{
	struct hinic_nic_dev *nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);
	int ret;
	ret = hinic_dev_stats_reset(dev);
	if (ret != 0)
		return ret;
	if (hinic_func_type(nic_dev->hwdev) != TYPE_VF) {
		ret = hinic_clear_phy_port_stats(nic_dev->hwdev);
		if (ret != 0)
			return ret;
	}
	return 0;
}
static int hinic_dev_xstats_reset ( struct rte_eth_dev * dev ) { struct hinic_nic_dev * nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV ( dev ) ; int ret ; ret = hinic_dev_stats_reset ( dev ) ; if ( ret != 0 ) return ret ; if ( hinic_func_type ( nic_dev -> hwdev ) != TYPE_VF ) { ret = hinic_clear_phy_port_stats ( nic_dev -> hwdev ) ; if ( ret != 0 ) return ret ; } return 0 ; }
DPDK callback to clear device extended statistics.
DPDK callback to clear device extended statistics .