src/dpdk/drivers/net/mlx4/mlx4_ethdev.c
int
mlx4_stats_reset(struct rte_eth_dev *dev)
{
	unsigned int i;

	for (i = 0; i != dev->data->nb_rx_queues; ++i) {
		struct rxq *rxq = dev->data->rx_queues[i];

		if (rxq)
			rxq->stats = (struct mlx4_rxq_stats){
				.idx = rxq->stats.idx,
			};
	}
	for (i = 0; i != dev->data->nb_tx_queues; ++i) {
		struct txq *txq = dev->data->tx_queues[i];

		if (txq)
			txq->stats = (struct mlx4_txq_stats){
				.idx = txq->stats.idx,
			};
	}

	return 0;
}
/**
 * DPDK callback to clear device statistics.
 *
 * @param dev
 *   Pointer to Ethernet device structure.
 *
 * @return
 *   alwasy 0 on success
 */
DPDK callback to clear device statistics.
@param dev
Pointer to Ethernet device structure.

@return
alwasy 0 on success
DPDK callback to clear device statistics . @param dev Pointer to Ethernet device structure . @return alwasy 0 on success
int
mlx4_stats_reset(struct rte_eth_dev *dev)
{
	unsigned int i;
	for (i = 0; i != dev->data->nb_rx_queues; ++i) {
		struct rxq *rxq = dev->data->rx_queues[i];
		if (rxq)
			rxq->stats = (struct mlx4_rxq_stats){
				.idx = rxq->stats.idx,
			};
	}
	for (i = 0; i != dev->data->nb_tx_queues; ++i) {
		struct txq *txq = dev->data->tx_queues[i];
		if (txq)
			txq->stats = (struct mlx4_txq_stats){
				.idx = txq->stats.idx,
			};
	}
	return 0;
}
int mlx4_stats_reset ( struct rte_eth_dev * dev ) { unsigned int i ; for ( i = 0 ; i != dev -> data -> nb_rx_queues ; ++ i ) { struct rxq * rxq = dev -> data -> rx_queues [ i ] ; if ( rxq ) rxq -> stats = ( struct mlx4_rxq_stats ) { . idx = rxq -> stats . idx , } ; } for ( i = 0 ; i != dev -> data -> nb_tx_queues ; ++ i ) { struct txq * txq = dev -> data -> tx_queues [ i ] ; if ( txq ) txq -> stats = ( struct mlx4_txq_stats ) { . idx = txq -> stats . idx , } ; } return 0 ; }
DPDK callback to clear device statistics.
DPDK callback to clear device statistics .