src/dpdk/drivers/net/hns3/hns3_stats.c
static void
hns3_tqp_basic_stats_clear(struct rte_eth_dev *dev)
{
	struct hns3_tx_queue *txq;
	struct hns3_rx_queue *rxq;
	uint16_t i;

	for (i = 0; i < dev->data->nb_rx_queues; i++) {
		rxq = dev->data->rx_queues[i];
		if (rxq)
			memset(&rxq->basic_stats, 0,
			       sizeof(struct hns3_rx_basic_stats));
	}

	for (i = 0; i < dev->data->nb_tx_queues; i++) {
		txq = dev->data->tx_queues[i];
		if (txq)
			memset(&txq->basic_stats, 0,
			       sizeof(struct hns3_tx_basic_stats));
	}
}
/*
 * The function is only called by hns3_dev_xstats_reset to clear
 * basic stats of per-queue. TQP stats are all cleared in hns3_stats_reset
 * which is called before this function.
 *
 * @param dev
 *   Pointer to Ethernet device.
 */
The function is only called by hns3_dev_xstats_reset to clear
basic stats of per-queue. TQP stats are all cleared in hns3_stats_reset
which is called before this function.

@param dev
Pointer to Ethernet device.
The function is only called by hns3_dev_xstats_reset to clear basic stats of per - queue . TQP stats are all cleared in hns3_stats_reset which is called before this function . @param dev Pointer to Ethernet device .
static void
hns3_tqp_basic_stats_clear(struct rte_eth_dev *dev)
{
	struct hns3_tx_queue *txq;
	struct hns3_rx_queue *rxq;
	uint16_t i;
	for (i = 0; i < dev->data->nb_rx_queues; i++) {
		rxq = dev->data->rx_queues[i];
		if (rxq)
			memset(&rxq->basic_stats, 0,
			       sizeof(struct hns3_rx_basic_stats));
	}
	for (i = 0; i < dev->data->nb_tx_queues; i++) {
		txq = dev->data->tx_queues[i];
		if (txq)
			memset(&txq->basic_stats, 0,
			       sizeof(struct hns3_tx_basic_stats));
	}
}
static void hns3_tqp_basic_stats_clear ( struct rte_eth_dev * dev ) { struct hns3_tx_queue * txq ; struct hns3_rx_queue * rxq ; uint16_t i ; for ( i = 0 ; i < dev -> data -> nb_rx_queues ; i ++ ) { rxq = dev -> data -> rx_queues [ i ] ; if ( rxq ) memset ( & rxq -> basic_stats , 0 , sizeof ( struct hns3_rx_basic_stats ) ) ; } for ( i = 0 ; i < dev -> data -> nb_tx_queues ; i ++ ) { txq = dev -> data -> tx_queues [ i ] ; if ( txq ) memset ( & txq -> basic_stats , 0 , sizeof ( struct hns3_tx_basic_stats ) ) ; } }
The function is only called by hns3_dev_xstats_reset to clear
 basic stats of per-queue.
The function is only called by hns3_dev_xstats_reset to clear basic stats of per - queue .