On 3/9/2018 8:42 AM, Ravi Kumar wrote:
> Signed-off-by: Ravi Kumar <ravi1.ku...@amd.com>

<...>

> +static int
> +axgbe_dev_stats_get(struct rte_eth_dev *dev,
> +                 struct rte_eth_stats *stats)
> +{
> +     struct axgbe_rx_queue *rxq;
> +     struct axgbe_tx_queue *txq;
> +     unsigned int i;
> +
> +     for (i = 0; i < dev->data->nb_rx_queues; i++) {
> +             rxq = dev->data->rx_queues[i];
> +             stats->q_ipackets[i] = rxq->pkts;
> +             stats->ipackets += rxq->pkts;
> +             stats->q_ibytes[i] = rxq->bytes;
> +             stats->ibytes += rxq->bytes;
> +     }
> +     for (i = 0; i < dev->data->nb_tx_queues; i++) {
> +             txq = dev->data->tx_queues[i];
> +             stats->q_opackets[i] = txq->pkts;
> +             stats->opackets += txq->pkts;
> +             stats->q_obytes[i] = txq->bytes;
> +             stats->obytes += txq->bytes;
> +     }

Just as a reminder of imissed and ierror, it is OK if they are not ready to use
in this stage.

<...>

Reply via email to